Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- ctorNameToAnn :: forall ctor. (KnownSymbol ctor, HasCallStack) => FieldAnn
- type CanHaveEntryPoints a = If (IsPrimitiveValue a) False (GCanHaveEntryPoints (Rep a))
- type family RequireSumType (a :: Type) :: Constraint where ...
Documentation
ctorNameToAnn :: forall ctor. (KnownSymbol ctor, HasCallStack) => FieldAnn Source #
type CanHaveEntryPoints a = If (IsPrimitiveValue a) False (GCanHaveEntryPoints (Rep a)) Source #
Used to understand whether a type can potentially declare any entrypoints.
This type family is conservative, if we are not sure, we suppose that type may have entrypoints.
type family RequireSumType (a :: Type) :: Constraint where ... Source #
Ensure that given type is a sum type.
This helps to prevent attempts to apply a function to, for instance, a pair.
RequireSumType a = If (CanHaveEntryPoints a) (() :: Constraint) (TypeError (Text "Expected sum type")) |