Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class HasBlueprintDefinition (t :: Type) where
- type Unroll t :: [Type]
- definitionId :: DefinitionId
- type family UnrollIsStuckError x where ...
- type family RepIsStuckError x where ...
- type Unrolled t = Reverse (IfStuckUnroll (UnrollIsStuckError t) (Unroll t))
- type family UnrollAll xs :: [Type] where ...
- type family GUnroll (t :: Type -> Type) :: [Type] where ...
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
.
Nothing
type Unroll t :: [Type] Source #
type Unroll t = Insert t (GUnroll (IfStuckRep (RepIsStuckError t) (Rep t)))
definitionId :: DefinitionId Source #
default definitionId :: Typeable t => DefinitionId Source #
Instances
type family UnrollIsStuckError x where ... Source #
Compile-time error that happens when a type couldn't be unrolled
(Unroll
TF is "stuck")
UnrollIsStuckError x = TypeError (Text "No instance: " :<>: ShowType (HasBlueprintDefinition x)) |
type family RepIsStuckError x where ... Source #
Compile-time error that happens when type's generic representation is not defined
(Rep
TF is "stuck")
type Unrolled t = Reverse (IfStuckUnroll (UnrollIsStuckError t) (Unroll t)) Source #
Same as Unroll
but with a nicer error message