plutus-tx-1.39.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Blueprint.Definition.Unroll

Synopsis

Documentation

class HasBlueprintDefinition (t ∷ Type) where Source #

Designates a class of types that could be used as a Blueprint Definition. Each such type: - could be unrolled to a list of all nested types (including the type itself). - has a unique DefinitionId.

Minimal complete definition

Nothing

Associated Types

type Unroll t ∷ [Type] Source #

Instances

Instances details
HasBlueprintDefinition Void Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll Void ∷ [Type] Source #

HasBlueprintDefinition BuiltinByteString Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll BuiltinByteString ∷ [Type] Source #

HasBlueprintDefinition BuiltinData Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll BuiltinData ∷ [Type] Source #

HasBlueprintDefinition BuiltinString Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll BuiltinString ∷ [Type] Source #

HasBlueprintDefinition BuiltinUnit Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll BuiltinUnit ∷ [Type] Source #

HasBlueprintDefinition Rational Source # 
Instance details

Defined in PlutusTx.Ratio

Associated Types

type Unroll Rational ∷ [Type] Source #

HasBlueprintDefinition Integer Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll Integer ∷ [Type] Source #

HasBlueprintDefinition () Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll () ∷ [Type] Source #

HasBlueprintDefinition Bool Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll Bool ∷ [Type] Source #

HasBlueprintDefinition Int Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll Int ∷ [Type] Source #

HasBlueprintDefinition a ⇒ HasBlueprintDefinition (BuiltinList a) Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll (BuiltinList a) ∷ [Type] Source #

HasBlueprintDefinition a ⇒ HasBlueprintDefinition (Maybe a) Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll (Maybe a) ∷ [Type] Source #

HasBlueprintDefinition a ⇒ HasBlueprintDefinition [a] Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll [a] ∷ [Type] Source #

(HasBlueprintDefinition k, HasBlueprintDefinition v) ⇒ HasBlueprintDefinition (Map k v) Source # 
Instance details

Defined in PlutusTx.AssocMap

Associated Types

type Unroll (Map k v) ∷ [Type] Source #

(HasBlueprintDefinition a, HasBlueprintDefinition b) ⇒ HasBlueprintDefinition (BuiltinPair a b) Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll (BuiltinPair a b) ∷ [Type] Source #

(Typeable a, Typeable b) ⇒ HasBlueprintDefinition (These a b) Source # 
Instance details

Defined in PlutusTx.These

Associated Types

type Unroll (These a b) ∷ [Type] Source #

(HasBlueprintDefinition a, HasBlueprintDefinition b) ⇒ HasBlueprintDefinition (a, b) Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll (a, b) ∷ [Type] Source #

(HasBlueprintDefinition a, HasBlueprintDefinition b, HasBlueprintDefinition c) ⇒ HasBlueprintDefinition (a, b, c) Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll (a, b, c) ∷ [Type] Source #

type family UnrollIsStuckError x where ... Source #

Compile-time error that happens when a type couldn't be unrolled (Unroll TF is "stuck")

type family RepIsStuckError x where ... Source #

Compile-time error that happens when type's generic representation is not defined (Rep TF is "stuck")

Equations

RepIsStuckError x = TypeError (Text "No instance: " :<>: ShowType (Generic x)) 

type Unrolled t = Reverse (IfStuckUnroll (UnrollIsStuckError t) (Unroll t)) Source #

Same as Unroll but with a nicer error message

type family UnrollAll xs ∷ [Type] where ... Source #

Unrolls all types in the list xs

Equations

UnrollAll '[] = '[] 
UnrollAll (x ': xs) = Nub (Concat (Unrolled x) (UnrollAll xs)) 

type family GUnroll (t ∷ TypeType) ∷ [Type] where ... Source #

Unroll a generic representation of a type into a list of all nested types.

Equations

GUnroll (M1 _ _ f) = GUnroll f 
GUnroll (f :*: g) = GUnroll f ++ GUnroll g 
GUnroll (f :+: g) = GUnroll f ++ GUnroll g 
GUnroll (K1 _ c) = Unrolled c 
GUnroll U1 = '[]