Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module assigns types to built-ins.
See the plutusplutus-coredocs/Constant application.md
article for how this emerged.
Synopsis
- class Typeable (a ∷ k)
- data TypeScheme val (args ∷ [Type]) res where
- TypeSchemeResult ∷ (Typeable res, KnownTypeAst TyName (UniOf val) res, MakeKnown val res) ⇒ TypeScheme val '[] res
- TypeSchemeArrow ∷ (Typeable arg, KnownTypeAst TyName (UniOf val) arg, MakeKnown val arg, ReadKnown val arg) ⇒ TypeScheme val args res → TypeScheme val (arg ': args) res
- TypeSchemeAll ∷ (KnownSymbol text, KnownNat uniq, KnownKind kind) ⇒ Proxy '(text, uniq, kind) → TypeScheme val args res → TypeScheme val args res
- argProxy ∷ TypeScheme val (arg ': args) res → Proxy arg
- typeSchemeToType ∷ TypeScheme val args res → Type TyName (UniOf val) ()
Documentation
class Typeable (a ∷ k) Source #
The class Typeable
allows a concrete representation of a type to
be calculated.
typeRep#
data TypeScheme val (args ∷ [Type]) res where Source #
The type of type schemes of built-in functions.
args
is a list of types of arguments, res
is the resulting type.
E.g. Text -> Bool -> Integer
is encoded as TypeScheme val [Text, Bool] Integer
.
TypeSchemeResult ∷ (Typeable res, KnownTypeAst TyName (UniOf val) res, MakeKnown val res) ⇒ TypeScheme val '[] res | |
TypeSchemeArrow ∷ (Typeable arg, KnownTypeAst TyName (UniOf val) arg, MakeKnown val arg, ReadKnown val arg) ⇒ TypeScheme val args res → TypeScheme val (arg ': args) res infixr 9 | |
TypeSchemeAll ∷ (KnownSymbol text, KnownNat uniq, KnownKind kind) ⇒ Proxy '(text, uniq, kind) → TypeScheme val args res → TypeScheme val args res |
Instances
Show (TypeScheme val args res) Source # | |
Defined in PlutusCore.Builtin.TypeScheme |
argProxy ∷ TypeScheme val (arg ': args) res → Proxy arg Source #
typeSchemeToType ∷ TypeScheme val args res → Type TyName (UniOf val) () Source #
Convert a TypeScheme
to the corresponding Kind
.