plutus-core-1.36.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.Core

Synopsis

Documentation

data Kind ann Source #

Constructors

Type ann 
KindArrow ann (Kind ann) (Kind ann) 

Instances

Instances details
Functor Kind Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

fmap :: (a -> b) -> Kind a -> Kind b Source #

(<$) :: a -> Kind b -> Kind a Source #

CollectScopeInfo Kind Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

EstablishScoping Kind Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

DefaultPrettyPlcStrategy (Kind ann) => PrettyBy PrettyConfigPlc (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

prettyBy :: PrettyConfigPlc -> Kind ann -> Doc ann0 #

prettyListBy :: PrettyConfigPlc -> [Kind ann] -> Doc ann0 #

Lift ann => Lift (Kind ann :: Type) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

lift :: Quote m => Kind ann -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Kind ann -> Code m (Kind ann) Source #

Generic (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

type Rep (Kind ann) :: Type -> Type Source #

Methods

from :: Kind ann -> Rep (Kind ann) x Source #

to :: Rep (Kind ann) x -> Kind ann Source #

Show ann => Show (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

showsPrec :: Int -> Kind ann -> ShowS Source #

show :: Kind ann -> String Source #

showList :: [Kind ann] -> ShowS Source #

NFData ann => NFData (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

rnf :: Kind ann -> () Source #

Flat ann => Flat (Kind ann) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: Kind ann -> Encoding

decode :: Get (Kind ann)

size :: Kind ann -> NumBits -> NumBits

Eq ann => Eq (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

(==) :: Kind ann -> Kind ann -> Bool Source #

(/=) :: Kind ann -> Kind ann -> Bool Source #

Hashable ann => Hashable (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

hashWithSalt :: Int -> Kind ann -> Int

hash :: Kind ann -> Int

Pretty ann => Pretty (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

pretty :: Kind ann -> Doc ann0 #

prettyList :: [Kind ann] -> Doc ann0 #

Pretty ann => PrettyBy (PrettyConfigClassic configName) (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Kind ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Kind ann] -> Doc ann0 #

PrettyBy (PrettyConfigReadable configName) (Kind a) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Kind a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Kind a] -> Doc ann #

type Rep (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type HasUniques (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type HasUniques (Kind ann) = ()

toPatFuncKind :: Kind () -> Kind () Source #

The kind of a pattern functor (the first Kind argument of TyIFix) at a given kind (of the second Kind argument of TyIFix):

toPatFuncKind k = (k -> *) -> k -> *

argsFunKind :: Kind ann -> [Kind ann] Source #

Extract all a_i from a_0 -> a_1 -> ... -> r.

data Type tyname uni ann Source #

A Kind assigned to expressions.

Constructors

TyVar ann tyname

Type variable

TyFun ann (Type tyname uni ann) (Type tyname uni ann)

Function type

TyIFix ann (Type tyname uni ann) (Type tyname uni ann)

Fix-point type, for constructing self-recursive types

TyForall ann tyname (Kind ann) (Type tyname uni ann)

Polymorphic type

TyBuiltin ann (SomeTypeIn uni)

Builtin type

TyLam ann tyname (Kind ann) (Type tyname uni ann)

Type lambda

TyApp ann (Type tyname uni ann) (Type tyname uni ann)

Type application

TySOP ann [[Type tyname uni ann]]

Sum-of-products type

Instances

Instances details
tyname ~ TyName => Reference TyName (Type tyname uni) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

Methods

referenceVia :: (forall name. ToScopedName name => name -> NameAnn) -> TyName -> Type tyname uni NameAnn -> Type tyname uni NameAnn Source #

DefaultPrettyPlcStrategy (Type tyname uni ann) => PrettyBy PrettyConfigPlc (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

prettyBy :: PrettyConfigPlc -> Type tyname uni ann -> Doc ann0 #

prettyListBy :: PrettyConfigPlc -> [Type tyname uni ann] -> Doc ann0 #

(PrettyClassicBy configName tyname, PrettyParens (SomeTypeIn uni), Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Type tyname uni ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Type tyname uni ann] -> Doc ann0 #

(PrettyReadableBy configName tyname, PrettyParens (SomeTypeIn uni)) => PrettyBy (PrettyConfigReadable configName) (Type tyname uni a) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Type tyname uni a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Type tyname uni a] -> Doc ann #

Functor (Type tyname uni) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

fmap :: (a -> b) -> Type tyname uni a -> Type tyname uni b Source #

(<$) :: a -> Type tyname uni b -> Type tyname uni a Source #

tyname ~ TyName => CollectScopeInfo (Type tyname uni) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

tyname ~ TyName => EstablishScoping (Type tyname uni) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

Methods

establishScoping :: Type tyname uni ann -> Quote (Type tyname uni NameAnn) Source #

Generic (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

type Rep (Type tyname uni ann) :: Type -> Type Source #

Methods

from :: Type tyname uni ann -> Rep (Type tyname uni ann) x Source #

to :: Rep (Type tyname uni ann) x -> Type tyname uni ann Source #

(GShow uni, Show tyname, Show ann) => Show (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

showsPrec :: Int -> Type tyname uni ann -> ShowS Source #

show :: Type tyname uni ann -> String Source #

showList :: [Type tyname uni ann] -> ShowS Source #

(NFData ann, NFData tyname, Closed uni) => NFData (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

rnf :: Type tyname uni ann -> () Source #

(Closed uni, Flat ann, Flat tyname) => Flat (Type tyname uni ann) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: Type tyname uni ann -> Encoding

decode :: Get (Type tyname uni ann)

size :: Type tyname uni ann -> NumBits -> NumBits

(GEq uni, Closed uni, Everywhere uni Eq, Eq ann) => Eq (Type NamedTyDeBruijn uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Eq

Methods

(==) :: Type NamedTyDeBruijn uni ann -> Type NamedTyDeBruijn uni ann -> Bool Source #

(/=) :: Type NamedTyDeBruijn uni ann -> Type NamedTyDeBruijn uni ann -> Bool Source #

(GEq uni, Closed uni, Everywhere uni Eq, Eq ann) => Eq (Type TyDeBruijn uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Eq

Methods

(==) :: Type TyDeBruijn uni ann -> Type TyDeBruijn uni ann -> Bool Source #

(/=) :: Type TyDeBruijn uni ann -> Type TyDeBruijn uni ann -> Bool Source #

(GEq uni, Eq ann) => Eq (Type TyName uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Eq

Methods

(==) :: Type TyName uni ann -> Type TyName uni ann -> Bool Source #

(/=) :: Type TyName uni ann -> Type TyName uni ann -> Bool Source #

HasUniques (Type tyname uni ann) => Rename (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Rename

Methods

rename :: MonadQuote m => Type tyname uni ann -> m (Type tyname uni ann) Source #

(PrettyClassic tyname, PrettyParens (SomeTypeIn uni), Pretty ann) => Pretty (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

pretty :: Type tyname uni ann -> Doc ann0 #

prettyList :: [Type tyname uni ann] -> Doc ann0 #

type Rep (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type Rep (Type tyname uni ann) = D1 ('MetaData "Type" "PlutusCore.Core.Type" "plutus-core-1.36.0.0-7ehJj5tIPqoJIiiivXkX9N" 'False) (((C1 ('MetaCons "TyVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tyname)) :+: C1 ('MetaCons "TyFun" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann))))) :+: (C1 ('MetaCons "TyIFix" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))) :+: C1 ('MetaCons "TyForall" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tyname)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))))) :+: ((C1 ('MetaCons "TyBuiltin" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SomeTypeIn uni))) :+: C1 ('MetaCons "TyLam" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tyname)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann))))) :+: (C1 ('MetaCons "TyApp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))) :+: C1 ('MetaCons "TySOP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [[Type tyname uni ann]])))))
type HasUniques (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type HasUniques (Type tyname uni ann) = HasUnique tyname TypeUnique

splitFunTyParts :: Type tyname uni a -> NonEmpty (Type tyname uni a) Source #

Get recursively all the domains and codomains of a type. splitFunTyParts (A->B->C) = [A, B, C] splitFunTyParts (X) = [X]

funTyArgs :: Type tyname uni a -> [Type tyname uni a] Source #

Get the argument types of a function type. funTyArgs (A->B->C) = [A, B]

funTyResultType :: Type tyname uni a -> Type tyname uni a Source #

Get the result type of a function. If not a function, then is the same as id funResultType (A->B->C) = C funResultType (X) = X

data Term tyname name uni fun ann Source #

Constructors

Var ann name

a named variable

LamAbs ann name (Type tyname uni ann) (Term tyname name uni fun ann)

lambda abstraction

Apply ann (Term tyname name uni fun ann) (Term tyname name uni fun ann)

application

TyAbs ann tyname (Kind ann) (Term tyname name uni fun ann)

type abstraction

TyInst ann (Term tyname name uni fun ann) (Type tyname uni ann)

instantiation

IWrap ann (Type tyname uni ann) (Type tyname uni ann) (Term tyname name uni fun ann)

wrapping

Unwrap ann (Term tyname name uni fun ann)

unwrapping See Note [Constr tag type]

Constr ann (Type tyname uni ann) Word64 [Term tyname name uni fun ann]

constructor

Case ann (Type tyname uni ann) (Term tyname name uni fun ann) [Term tyname name uni fun ann]

case

Constant ann (Some (ValueOf uni))

constants

Builtin ann fun

builtin functions

Error ann (Type tyname uni ann)

fail with error

Instances

Instances details
name ~ Name => Reference Name (Term tyname name uni fun) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

Methods

referenceVia :: (forall name0. ToScopedName name0 => name0 -> NameAnn) -> Name -> Term tyname name uni fun NameAnn -> Term tyname name uni fun NameAnn Source #

tyname ~ TyName => Reference TyName (Term tyname name uni fun) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

Methods

referenceVia :: (forall name0. ToScopedName name0 => name0 -> NameAnn) -> TyName -> Term tyname name uni fun NameAnn -> Term tyname name uni fun NameAnn Source #

DefaultPrettyPlcStrategy (Term tyname name uni fun ann) => PrettyBy PrettyConfigPlc (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

prettyBy :: PrettyConfigPlc -> Term tyname name uni fun ann -> Doc ann0 #

prettyListBy :: PrettyConfigPlc -> [Term tyname name uni fun ann] -> Doc ann0 #

(PrettyClassicBy configName tyname, PrettyClassicBy configName name, PrettyUni uni, Pretty fun, Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Term tyname name uni fun ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Term tyname name uni fun ann] -> Doc ann0 #

(PrettyReadableBy configName tyname, PrettyReadableBy configName name, PrettyUni uni, Pretty fun) => PrettyBy (PrettyConfigReadable configName) (Term tyname name uni fun a) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Term tyname name uni fun a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Term tyname name uni fun a] -> Doc ann #

AsTypeError (Error uni fun ann) (Term TyName Name uni fun ()) uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_TypeError :: Prism' (Error uni fun ann) (TypeError (Term TyName Name uni fun ()) uni fun ann) Source #

_KindMismatch :: Prism' (Error uni fun ann) (ann, Type TyName uni (), ExpectedShapeOr (Kind ()), Kind ()) Source #

_TypeMismatch :: Prism' (Error uni fun ann) (ann, Term TyName Name uni fun (), ExpectedShapeOr (Type TyName uni ()), Normalized (Type TyName uni ())) Source #

_TyNameMismatch :: Prism' (Error uni fun ann) (ann, TyName, TyName) Source #

_NameMismatch :: Prism' (Error uni fun ann) (ann, Name, Name) Source #

_FreeTypeVariableE :: Prism' (Error uni fun ann) (ann, TyName) Source #

_FreeVariableE :: Prism' (Error uni fun ann) (ann, Name) Source #

_UnknownBuiltinFunctionE :: Prism' (Error uni fun ann) (ann, fun) Source #

Functor (Term tyname name uni fun) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

fmap :: (a -> b) -> Term tyname name uni fun a -> Term tyname name uni fun b Source #

(<$) :: a -> Term tyname name uni fun b -> Term tyname name uni fun a Source #

(tyname ~ TyName, name ~ Name) => CollectScopeInfo (Term tyname name uni fun) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

Methods

collectScopeInfo :: Term tyname name uni fun NameAnn -> ScopeErrorOrInfo Source #

(tyname ~ TyName, name ~ Name) => EstablishScoping (Term tyname name uni fun) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

Methods

establishScoping :: Term tyname name uni fun ann -> Quote (Term tyname name uni fun NameAnn) Source #

TermLike (Term tyname name uni fun) tyname name uni fun Source # 
Instance details

Defined in PlutusCore.MkPlc

Methods

var :: ann -> name -> Term tyname name uni fun ann Source #

tyAbs :: ann -> tyname -> Kind ann -> Term tyname name uni fun ann -> Term tyname name uni fun ann Source #

lamAbs :: ann -> name -> Type tyname uni ann -> Term tyname name uni fun ann -> Term tyname name uni fun ann Source #

apply :: ann -> Term tyname name uni fun ann -> Term tyname name uni fun ann -> Term tyname name uni fun ann Source #

constant :: ann -> Some (ValueOf uni) -> Term tyname name uni fun ann Source #

builtin :: ann -> fun -> Term tyname name uni fun ann Source #

tyInst :: ann -> Term tyname name uni fun ann -> Type tyname uni ann -> Term tyname name uni fun ann Source #

unwrap :: ann -> Term tyname name uni fun ann -> Term tyname name uni fun ann Source #

iWrap :: ann -> Type tyname uni ann -> Type tyname uni ann -> Term tyname name uni fun ann -> Term tyname name uni fun ann Source #

error :: ann -> Type tyname uni ann -> Term tyname name uni fun ann Source #

constr :: ann -> Type tyname uni ann -> Word64 -> [Term tyname name uni fun ann] -> Term tyname name uni fun ann Source #

kase :: ann -> Type tyname uni ann -> Term tyname name uni fun ann -> [Term tyname name uni fun ann] -> Term tyname name uni fun ann Source #

termLet :: ann -> TermDef (Term tyname name uni fun) tyname name uni ann -> Term tyname name uni fun ann -> Term tyname name uni fun ann Source #

typeLet :: ann -> TypeDef tyname uni ann -> Term tyname name uni fun ann -> Term tyname name uni fun ann Source #

Generic (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

type Rep (Term tyname name uni fun ann) :: Type -> Type Source #

Methods

from :: Term tyname name uni fun ann -> Rep (Term tyname name uni fun ann) x Source #

to :: Rep (Term tyname name uni fun ann) x -> Term tyname name uni fun ann Source #

(Show tyname, Show name, GShow uni, Everywhere uni Show, Show fun, Show ann, Closed uni) => Show (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

showsPrec :: Int -> Term tyname name uni fun ann -> ShowS Source #

show :: Term tyname name uni fun ann -> String Source #

showList :: [Term tyname name uni fun ann] -> ShowS Source #

(NFData tyname, NFData name, NFData fun, NFData ann, Everywhere uni NFData, Closed uni) => NFData (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

rnf :: Term tyname name uni fun ann -> () Source #

(Closed uni, Everywhere uni Flat, Flat fun, Flat ann, Flat tyname, Flat name) => Flat (Term tyname name uni fun ann) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: Term tyname name uni fun ann -> Encoding

decode :: Get (Term tyname name uni fun ann)

size :: Term tyname name uni fun ann -> NumBits -> NumBits

(GEq uni, Closed uni, Everywhere uni Eq, Eq fun, Eq ann) => Eq (Term NamedTyDeBruijn NamedDeBruijn uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Eq

(GEq uni, Closed uni, Everywhere uni Eq, Eq fun, Eq ann) => Eq (Term TyDeBruijn DeBruijn uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Eq

Methods

(==) :: Term TyDeBruijn DeBruijn uni fun ann -> Term TyDeBruijn DeBruijn uni fun ann -> Bool Source #

(/=) :: Term TyDeBruijn DeBruijn uni fun ann -> Term TyDeBruijn DeBruijn uni fun ann -> Bool Source #

(GEq uni, Closed uni, Everywhere uni Eq, Eq fun, Eq ann) => Eq (Term TyName Name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Eq

Methods

(==) :: Term TyName Name uni fun ann -> Term TyName Name uni fun ann -> Bool Source #

(/=) :: Term TyName Name uni fun ann -> Term TyName Name uni fun ann -> Bool Source #

HasConstant (Term TyName Name uni fun ()) Source # 
Instance details

Defined in PlutusCore.Builtin.HasConstant

Methods

asConstant :: Term TyName Name uni fun () -> Either BuiltinError (Some (ValueOf (UniOf (Term TyName Name uni fun ())))) Source #

fromConstant :: Some (ValueOf (UniOf (Term TyName Name uni fun ()))) -> Term TyName Name uni fun () Source #

ExMemoryUsage (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

memoryUsage :: Term tyname name uni fun ann -> CostRose Source #

HasUniques (Term tyname name uni fun ann) => Rename (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Rename

Methods

rename :: MonadQuote m => Term tyname name uni fun ann -> m (Term tyname name uni fun ann) Source #

(PrettyClassic tyname, PrettyClassic name, PrettyUni uni, Pretty fun, Pretty ann) => Pretty (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

pretty :: Term tyname name uni fun ann -> Doc ann0 #

prettyList :: [Term tyname name uni fun ann] -> Doc ann0 #

type Rep (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type Rep (Term tyname name uni fun ann) = D1 ('MetaData "Term" "PlutusCore.Core.Type" "plutus-core-1.36.0.0-7ehJj5tIPqoJIiiivXkX9N" 'False) (((C1 ('MetaCons "Var" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 name)) :+: (C1 ('MetaCons "LamAbs" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 name)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)))) :+: C1 ('MetaCons "Apply" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)))))) :+: (C1 ('MetaCons "TyAbs" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tyname)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)))) :+: (C1 ('MetaCons "TyInst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))) :+: C1 ('MetaCons "IWrap" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann))))))) :+: ((C1 ('MetaCons "Unwrap" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann))) :+: (C1 ('MetaCons "Constr" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Term tyname name uni fun ann]))) :+: C1 ('MetaCons "Case" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Term tyname name uni fun ann]))))) :+: (C1 ('MetaCons "Constant" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Some (ValueOf uni)))) :+: (C1 ('MetaCons "Builtin" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 fun)) :+: C1 ('MetaCons "Error" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))))))
type HasUniques (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type HasUniques (Term tyname name uni fun ann) = (HasUnique tyname TypeUnique, HasUnique name TermUnique)
type UniOf (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type UniOf (Term tyname name uni fun ann) = uni

data Program tyname name uni fun ann Source #

A Program is simply a Term coupled with a Version of the core language.

Constructors

Program 

Fields

Instances

Instances details
DefaultPrettyPlcStrategy (Program tyname name uni fun ann) => PrettyBy PrettyConfigPlc (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

prettyBy :: PrettyConfigPlc -> Program tyname name uni fun ann -> Doc ann0 #

prettyListBy :: PrettyConfigPlc -> [Program tyname name uni fun ann] -> Doc ann0 #

(PrettyClassicBy configName (Term tyname name uni fun ann), Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Program tyname name uni fun ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Program tyname name uni fun ann] -> Doc ann0 #

PrettyReadableBy configName (Term tyname name uni fun a) => PrettyBy (PrettyConfigReadable configName) (Program tyname name uni fun a) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Program tyname name uni fun a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Program tyname name uni fun a] -> Doc ann #

Functor (Program tyname name uni fun) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

fmap :: (a -> b) -> Program tyname name uni fun a -> Program tyname name uni fun b Source #

(<$) :: a -> Program tyname name uni fun b -> Program tyname name uni fun a Source #

(tyname ~ TyName, name ~ Name) => CollectScopeInfo (Program tyname name uni fun) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

Methods

collectScopeInfo :: Program tyname name uni fun NameAnn -> ScopeErrorOrInfo Source #

(tyname ~ TyName, name ~ Name) => EstablishScoping (Program tyname name uni fun) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

Methods

establishScoping :: Program tyname name uni fun ann -> Quote (Program tyname name uni fun NameAnn) Source #

Generic (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

type Rep (Program tyname name uni fun ann) :: Type -> Type Source #

Methods

from :: Program tyname name uni fun ann -> Rep (Program tyname name uni fun ann) x Source #

to :: Rep (Program tyname name uni fun ann) x -> Program tyname name uni fun ann Source #

(Show tyname, Show name, GShow uni, Everywhere uni Show, Show fun, Show ann, Closed uni) => Show (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

showsPrec :: Int -> Program tyname name uni fun ann -> ShowS Source #

show :: Program tyname name uni fun ann -> String Source #

showList :: [Program tyname name uni fun ann] -> ShowS Source #

(NFData tyname, NFData name, Everywhere uni NFData, NFData fun, NFData ann, Closed uni) => NFData (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

rnf :: Program tyname name uni fun ann -> () Source #

(Flat ann, Flat (Term tyname name uni fun ann)) => Flat (Program tyname name uni fun ann) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: Program tyname name uni fun ann -> Encoding

decode :: Get (Program tyname name uni fun ann)

size :: Program tyname name uni fun ann -> NumBits -> NumBits

(GEq uni, Closed uni, Everywhere uni Eq, Eq fun, Eq ann, Eq (Term tyname name uni fun ann)) => Eq (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Eq

Methods

(==) :: Program tyname name uni fun ann -> Program tyname name uni fun ann -> Bool Source #

(/=) :: Program tyname name uni fun ann -> Program tyname name uni fun ann -> Bool Source #

HasUniques (Program tyname name uni fun ann) => Rename (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Rename

Methods

rename :: MonadQuote m => Program tyname name uni fun ann -> m (Program tyname name uni fun ann) Source #

(PrettyClassic tyname, PrettyClassic name, PrettyUni uni, Pretty fun, Pretty ann) => Pretty (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

pretty :: Program tyname name uni fun ann -> Doc ann0 #

prettyList :: [Program tyname name uni fun ann] -> Doc ann0 #

type Rep (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type Rep (Program tyname name uni fun ann) = D1 ('MetaData "Program" "PlutusCore.Core.Type" "plutus-core-1.36.0.0-7ehJj5tIPqoJIiiivXkX9N" 'False) (C1 ('MetaCons "Program" 'PrefixI 'True) (S1 ('MetaSel ('Just "_progAnn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Just "_progVer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version) :*: S1 ('MetaSel ('Just "_progTerm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)))))
type HasUniques (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type HasUniques (Program tyname name uni fun ann) = HasUniques (Term tyname name uni fun ann)

type HasTermLevel uni = Includes uni Source #

Specifies that the given type is a built-in one and its values can be embedded into a Term.

type family UniOf a :: Type -> Type Source #

Extract the universe from a type.

Instances

Instances details
type UniOf (Opaque val rep) Source # 
Instance details

Defined in PlutusCore.Builtin.Polymorphism

type UniOf (Opaque val rep) = UniOf val
type UniOf (SomeConstant uni rep) Source # 
Instance details

Defined in PlutusCore.Builtin.Polymorphism

type UniOf (SomeConstant uni rep) = uni
type UniOf (CkValue uni fun) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Ck

type UniOf (CkValue uni fun) = uni
type UniOf (CekValue uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

type UniOf (CekValue uni fun ann) = uni
type UniOf (Term name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Type

type UniOf (Term name uni fun ann) = uni
type UniOf (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type UniOf (Term tyname name uni fun ann) = uni

newtype Normalized a Source #

Constructors

Normalized 

Fields

Instances

Instances details
Foldable Normalized Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

fold :: Monoid m => Normalized m -> m Source #

foldMap :: Monoid m => (a -> m) -> Normalized a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Normalized a -> m Source #

foldr :: (a -> b -> b) -> b -> Normalized a -> b Source #

foldr' :: (a -> b -> b) -> b -> Normalized a -> b Source #

foldl :: (b -> a -> b) -> b -> Normalized a -> b Source #

foldl' :: (b -> a -> b) -> b -> Normalized a -> b Source #

foldr1 :: (a -> a -> a) -> Normalized a -> a Source #

foldl1 :: (a -> a -> a) -> Normalized a -> a Source #

toList :: Normalized a -> [a] Source #

null :: Normalized a -> Bool Source #

length :: Normalized a -> Int Source #

elem :: Eq a => a -> Normalized a -> Bool Source #

maximum :: Ord a => Normalized a -> a Source #

minimum :: Ord a => Normalized a -> a Source #

sum :: Num a => Normalized a -> a Source #

product :: Num a => Normalized a -> a Source #

Traversable Normalized Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

traverse :: Applicative f => (a -> f b) -> Normalized a -> f (Normalized b) Source #

sequenceA :: Applicative f => Normalized (f a) -> f (Normalized a) Source #

mapM :: Monad m => (a -> m b) -> Normalized a -> m (Normalized b) Source #

sequence :: Monad m => Normalized (m a) -> m (Normalized a) Source #

Applicative Normalized Source # 
Instance details

Defined in PlutusCore.Core.Type

Functor Normalized Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

fmap :: (a -> b) -> Normalized a -> Normalized b Source #

(<$) :: a -> Normalized b -> Normalized a Source #

PrettyBy config a => PrettyBy config (Normalized a) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

prettyBy :: config -> Normalized a -> Doc ann #

prettyListBy :: config -> [Normalized a] -> Doc ann #

Generic (Normalized a) Source # 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

type Rep (Normalized a) :: Type -> Type Source #

Methods

from :: Normalized a -> Rep (Normalized a) x Source #

to :: Rep (Normalized a) x -> Normalized a Source #

Show a => Show (Normalized a) Source # 
Instance details

Defined in PlutusCore.Core.Type

NFData a => NFData (Normalized a) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

rnf :: Normalized a -> () Source #

Flat a => Flat (Normalized a) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: Normalized a -> Encoding

decode :: Get (Normalized a)

size :: Normalized a -> NumBits -> NumBits

Eq a => Eq (Normalized a) Source # 
Instance details

Defined in PlutusCore.Core.Type

Rename a => Rename (Normalized a) Source # 
Instance details

Defined in PlutusCore.Rename

Methods

rename :: MonadQuote m => Normalized a -> m (Normalized a) Source #

Pretty a => Pretty (Normalized a) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

pretty :: Normalized a -> Doc ann #

prettyList :: [Normalized a] -> Doc ann #

type Rep (Normalized a) Source # 
Instance details

Defined in PlutusCore.Core.Type

type Rep (Normalized a) = D1 ('MetaData "Normalized" "PlutusCore.Core.Type" "plutus-core-1.36.0.0-7ehJj5tIPqoJIiiivXkX9N" 'True) (C1 ('MetaCons "Normalized" 'PrefixI 'True) (S1 ('MetaSel ('Just "unNormalized") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

data TyVarDecl tyname ann Source #

A "type variable declaration", i.e. a name and a kind for a type variable.

Constructors

TyVarDecl 

Fields

Instances

Instances details
Functor (TyVarDecl tyname) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

fmap :: (a -> b) -> TyVarDecl tyname a -> TyVarDecl tyname b Source #

(<$) :: a -> TyVarDecl tyname b -> TyVarDecl tyname a Source #

PrettyReadableBy configName tyname => PrettyBy (PrettyConfigReadable configName) (TyVarDecl tyname ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> TyVarDecl tyname ann -> Doc ann0 #

prettyListBy :: PrettyConfigReadable configName -> [TyVarDecl tyname ann] -> Doc ann0 #

Generic (TyVarDecl tyname ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

type Rep (TyVarDecl tyname ann) :: Type -> Type Source #

Methods

from :: TyVarDecl tyname ann -> Rep (TyVarDecl tyname ann) x Source #

to :: Rep (TyVarDecl tyname ann) x -> TyVarDecl tyname ann Source #

(Show ann, Show tyname) => Show (TyVarDecl tyname ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

showsPrec :: Int -> TyVarDecl tyname ann -> ShowS Source #

show :: TyVarDecl tyname ann -> String Source #

showList :: [TyVarDecl tyname ann] -> ShowS Source #

(Flat ann, Flat tyname) => Flat (TyVarDecl tyname ann) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: TyVarDecl tyname ann -> Encoding

decode :: Get (TyVarDecl tyname ann)

size :: TyVarDecl tyname ann -> NumBits -> NumBits

HasUnique tyname TypeUnique => HasUnique (TyVarDecl tyname ann) TypeUnique Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

unique :: Lens' (TyVarDecl tyname ann) TypeUnique Source #

type Rep (TyVarDecl tyname ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type Rep (TyVarDecl tyname ann) = D1 ('MetaData "TyVarDecl" "PlutusCore.Core.Type" "plutus-core-1.36.0.0-7ehJj5tIPqoJIiiivXkX9N" 'False) (C1 ('MetaCons "TyVarDecl" 'PrefixI 'True) (S1 ('MetaSel ('Just "_tyVarDeclAnn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Just "_tyVarDeclName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tyname) :*: S1 ('MetaSel ('Just "_tyVarDeclKind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ann)))))

data VarDecl tyname name uni ann Source #

A "variable declaration", i.e. a name and a type for a variable.

Constructors

VarDecl 

Fields

Instances

Instances details
(PrettyReadableBy configName tyname, PrettyReadableBy configName name, PrettyUni uni) => PrettyBy (PrettyConfigReadable configName) (VarDecl tyname name uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> VarDecl tyname name uni ann -> Doc ann0 #

prettyListBy :: PrettyConfigReadable configName -> [VarDecl tyname name uni ann] -> Doc ann0 #

Functor (VarDecl tyname name uni) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

fmap :: (a -> b) -> VarDecl tyname name uni a -> VarDecl tyname name uni b Source #

(<$) :: a -> VarDecl tyname name uni b -> VarDecl tyname name uni a Source #

Generic (VarDecl tyname name uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

type Rep (VarDecl tyname name uni ann) :: Type -> Type Source #

Methods

from :: VarDecl tyname name uni ann -> Rep (VarDecl tyname name uni ann) x Source #

to :: Rep (VarDecl tyname name uni ann) x -> VarDecl tyname name uni ann Source #

(GShow uni, Show ann, Show name, Show tyname) => Show (VarDecl tyname name uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

showsPrec :: Int -> VarDecl tyname name uni ann -> ShowS Source #

show :: VarDecl tyname name uni ann -> String Source #

showList :: [VarDecl tyname name uni ann] -> ShowS Source #

(Closed uni, Flat ann, Flat tyname, Flat name) => Flat (VarDecl tyname name uni ann) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: VarDecl tyname name uni ann -> Encoding

decode :: Get (VarDecl tyname name uni ann)

size :: VarDecl tyname name uni ann -> NumBits -> NumBits

HasUnique name TermUnique => HasUnique (VarDecl tyname name uni ann) TermUnique Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

unique :: Lens' (VarDecl tyname name uni ann) TermUnique Source #

type Rep (VarDecl tyname name uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type Rep (VarDecl tyname name uni ann) = D1 ('MetaData "VarDecl" "PlutusCore.Core.Type" "plutus-core-1.36.0.0-7ehJj5tIPqoJIiiivXkX9N" 'False) (C1 ('MetaCons "VarDecl" 'PrefixI 'True) (S1 ('MetaSel ('Just "_varDeclAnn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Just "_varDeclName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 name) :*: S1 ('MetaSel ('Just "_varDeclType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))))

data TyDecl tyname uni ann Source #

A "type declaration", i.e. a kind for a type.

Constructors

TyDecl 

Fields

Instances

Instances details
Functor (TyDecl tyname uni) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

fmap :: (a -> b) -> TyDecl tyname uni a -> TyDecl tyname uni b Source #

(<$) :: a -> TyDecl tyname uni b -> TyDecl tyname uni a Source #

Generic (TyDecl tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

type Rep (TyDecl tyname uni ann) :: Type -> Type Source #

Methods

from :: TyDecl tyname uni ann -> Rep (TyDecl tyname uni ann) x Source #

to :: Rep (TyDecl tyname uni ann) x -> TyDecl tyname uni ann Source #

(GShow uni, Show ann, Show tyname) => Show (TyDecl tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

showsPrec :: Int -> TyDecl tyname uni ann -> ShowS Source #

show :: TyDecl tyname uni ann -> String Source #

showList :: [TyDecl tyname uni ann] -> ShowS Source #

type Rep (TyDecl tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type Rep (TyDecl tyname uni ann) = D1 ('MetaData "TyDecl" "PlutusCore.Core.Type" "plutus-core-1.36.0.0-7ehJj5tIPqoJIiiivXkX9N" 'False) (C1 ('MetaCons "TyDecl" 'PrefixI 'True) (S1 ('MetaSel ('Just "_tyDeclAnn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Just "_tyDeclType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('Just "_tyDeclKind") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ann)))))

tyDeclVar :: TyVarDecl tyname ann -> TyDecl tyname uni ann Source #

type family HasUniques a :: Constraint Source #

All kinds of uniques an entity contains.

Instances

Instances details
type HasUniques (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type HasUniques (Kind ann) = ()
type HasUniques (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type HasUniques (Type tyname uni ann) = HasUnique tyname TypeUnique
type HasUniques (Program name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Type

type HasUniques (Program name uni fun ann) = HasUniques (Term name uni fun ann)
type HasUniques (Term name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Type

type HasUniques (Term name uni fun ann) = HasUnique name TermUnique
type HasUniques (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type HasUniques (Program tyname name uni fun ann) = HasUniques (Term tyname name uni fun ann)
type HasUniques (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type HasUniques (Term tyname name uni fun ann) = (HasUnique tyname TypeUnique, HasUnique name TermUnique)

newtype Binder name Source #

This is a wrapper to mark the place where the binder is introduced (i.e. LamAbs/TyAbs) and not where it is actually used (TyVar/Var..). This marking allows us to skip the (de)serialization of binders at LamAbs/TyAbs positions iff name is DeBruijn-encoded (level or index). See for example the instance of Flat

Constructors

Binder 

Fields

Instances

Instances details
Functor Binder Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

fmap :: (a -> b) -> Binder a -> Binder b Source #

(<$) :: a -> Binder b -> Binder a Source #

Show name => Show (Binder name) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

showsPrec :: Int -> Binder name -> ShowS Source #

show :: Binder name -> String Source #

showList :: [Binder name] -> ShowS Source #

Flat (Binder DeBruijn) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: Binder DeBruijn -> Encoding

decode :: Get (Binder DeBruijn)

size :: Binder DeBruijn -> NumBits -> NumBits

Flat (Binder FakeNamedDeBruijn) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: Binder FakeNamedDeBruijn -> Encoding

decode :: Get (Binder FakeNamedDeBruijn)

size :: Binder FakeNamedDeBruijn -> NumBits -> NumBits

Flat (Binder NamedDeBruijn) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: Binder NamedDeBruijn -> Encoding

decode :: Get (Binder NamedDeBruijn)

size :: Binder NamedDeBruijn -> NumBits -> NumBits

Flat (Binder NamedTyDeBruijn) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: Binder NamedTyDeBruijn -> Encoding

decode :: Get (Binder NamedTyDeBruijn)

size :: Binder NamedTyDeBruijn -> NumBits -> NumBits

Flat (Binder Name) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: Binder Name -> Encoding

decode :: Get (Binder Name)

size :: Binder Name -> NumBits -> NumBits

Flat (Binder TyName) 
Instance details

Defined in PlutusCore.Flat

Methods

encode :: Binder TyName -> Encoding

decode :: Get (Binder TyName)

size :: Binder TyName -> NumBits -> NumBits

Eq name => Eq (Binder name) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

(==) :: Binder name -> Binder name -> Bool Source #

(/=) :: Binder name -> Binder name -> Bool Source #

Helper functions

termAnn :: Term tyname name uni fun ann -> ann Source #

typeAnn :: Type tyname uni ann -> ann Source #

mapFun :: (fun -> fun') -> Term tyname name uni fun ann -> Term tyname name uni fun' ann Source #

Map a function over the set of built-in functions.

tyVarDeclAnn :: forall tyname ann. Lens' (TyVarDecl tyname ann) ann Source #

tyVarDeclName :: forall tyname ann tyname. Lens (TyVarDecl tyname ann) (TyVarDecl tyname ann) tyname tyname Source #

tyVarDeclKind :: forall tyname ann. Lens' (TyVarDecl tyname ann) (Kind ann) Source #

varDeclAnn :: forall tyname name uni ann. Lens' (VarDecl tyname name uni ann) ann Source #

varDeclName :: forall tyname name uni ann name. Lens (VarDecl tyname name uni ann) (VarDecl tyname name uni ann) name name Source #

varDeclType :: forall tyname name uni ann tyname uni. Lens (VarDecl tyname name uni ann) (VarDecl tyname name uni ann) (Type tyname uni ann) (Type tyname uni ann) Source #

tyDeclAnn :: forall tyname uni ann. Lens' (TyDecl tyname uni ann) ann Source #

tyDeclType :: forall tyname uni ann tyname uni. Lens (TyDecl tyname uni ann) (TyDecl tyname uni ann) (Type tyname uni ann) (Type tyname uni ann) Source #

tyDeclKind :: forall tyname uni ann. Lens' (TyDecl tyname uni ann) (Kind ann) Source #

progAnn :: forall tyname name uni fun ann. Lens' (Program tyname name uni fun ann) ann Source #

progVer :: forall tyname name uni fun ann. Lens' (Program tyname name uni fun ann) Version Source #

progTerm :: forall tyname name uni fun ann tyname name uni fun. Lens (Program tyname name uni fun ann) (Program tyname name uni fun ann) (Term tyname name uni fun ann) (Term tyname name uni fun ann) Source #