morley-0.6.0: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Lorentz.EntryPoints.Helpers

Synopsis

Documentation

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.

Equations

RequireSumType a = If (CanHaveEntryPoints a) (() :: Constraint) (TypeError (Text "Expected sum type"))