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

PlutusIR.Core.Type

Synopsis

Documentation

newtype TyName Source #

We use a newtype to enforce separation between names used for types and those used for terms.

Constructors

TyName 

Fields

Instances

Instances details
Generic TyName 
Instance details

Defined in PlutusCore.Name.Unique

Associated Types

type Rep TyNameTypeType Source #

Methods

fromTyNameRep TyName x Source #

toRep TyName x → TyName Source #

Show TyName 
Instance details

Defined in PlutusCore.Name.Unique

NFData TyName 
Instance details

Defined in PlutusCore.Name.Unique

Methods

rnfTyName → () Source #

Eq TyName 
Instance details

Defined in PlutusCore.Name.Unique

Methods

(==)TyNameTyNameBool Source #

(/=)TyNameTyNameBool Source #

Ord TyName 
Instance details

Defined in PlutusCore.Name.Unique

Hashable TyName 
Instance details

Defined in PlutusCore.Name.Unique

Methods

hashWithSaltIntTyNameInt

hashTyNameInt

Wrapped TyName 
Instance details

Defined in PlutusCore.Name.Unique

Associated Types

type Unwrapped TyName

Methods

_Wrapped' ∷ Iso' TyName (Unwrapped TyName)

ToScopedName TyName 
Instance details

Defined in PlutusCore.Check.Scoping

HasText TyName 
Instance details

Defined in PlutusCore.Name.Unique

Methods

theTextLens' TyName Text Source #

HasUnique TyName TypeUnique 
Instance details

Defined in PlutusCore.Name.Unique

HasPrettyConfigName config ⇒ PrettyBy config TyName 
Instance details

Defined in PlutusCore.Name.Unique

Methods

prettyBy ∷ config → TyNameDoc ann Source #

prettyListBy ∷ config → [TyName] → Doc ann Source #

Lift TyName 
Instance details

Defined in PlutusCore.Name.Unique

Methods

liftQuote m ⇒ TyName → m Exp Source #

liftTyped ∷ ∀ (m ∷ TypeType). Quote m ⇒ TyNameCode m TyName Source #

tyname ~ TyNameReference TyName (VarDecl tyname name uni) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name0. ToScopedName name0 ⇒ name0 → NameAnn) → TyNameVarDecl tyname name uni NameAnnVarDecl tyname name uni NameAnn Source #

tyname ~ TyNameReference TyName (Datatype tyname name uni) Source #

Scoping for data types is hard, so we employ some extra paranoia and reference the provided TyName in the type of every single constructor, and also apply the final head to that TyName.

Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name0. ToScopedName name0 ⇒ name0 → NameAnn) → TyNameDatatype tyname name uni NameAnnDatatype tyname name uni NameAnn Source #

tyname ~ TyNameReference TyName (Binding tyname name uni fun) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name0. ToScopedName name0 ⇒ name0 → NameAnn) → TyNameBinding tyname name uni fun NameAnnBinding tyname name uni fun NameAnn Source #

tyname ~ TyNameReference TyName (Term tyname name uni fun) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name0. ToScopedName name0 ⇒ name0 → NameAnn) → TyNameTerm tyname name uni fun NameAnnTerm tyname name uni fun NameAnn Source #

AsTypeError (Error uni fun ann) (Term TyName Name uni fun ()) uni fun ann 
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 #

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

Defined in PlutusIR.Compiler.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 #

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

Defined in PlutusIR.Error

Methods

_TypeError ∷ Prism' (Error uni fun a) (TypeError (Term TyName Name uni fun ()) uni fun a) Source #

_KindMismatch ∷ Prism' (Error uni fun a) (a, Type TyName uni (), ExpectedShapeOr (Kind ()), Kind ()) Source #

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

_TyNameMismatch ∷ Prism' (Error uni fun a) (a, TyName, TyName) Source #

_NameMismatch ∷ Prism' (Error uni fun a) (a, Name, Name) Source #

_FreeTypeVariableE ∷ Prism' (Error uni fun a) (a, TyName) Source #

_FreeVariableE ∷ Prism' (Error uni fun a) (a, Name) Source #

_UnknownBuiltinFunctionE ∷ Prism' (Error uni fun a) (a, fun) Source #

(Reference TyName t, Reference Name t) ⇒ Reference (Datatype TyName Name uni ann) t Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name. ToScopedName name ⇒ name → NameAnn) → Datatype TyName Name uni ann → t NameAnn → t NameAnn Source #

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

Defined in PlutusCore.Builtin.HasConstant

Methods

asConstantTerm TyName Name uni fun () → Either BuiltinError (Some (ValueOf (UniOf (Term TyName Name uni fun ())))) Source #

fromConstantSome (ValueOf (UniOf (Term TyName Name uni fun ()))) → Term TyName Name uni fun () Source #

(Reference TyName t, Reference Name t) ⇒ Reference (Binding TyName Name uni fun ann) t Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name. ToScopedName name ⇒ name → NameAnn) → Binding TyName Name uni fun ann → t NameAnn → t NameAnn Source #

type Rep TyName 
Instance details

Defined in PlutusCore.Name.Unique

type Rep TyName = D1 ('MetaData "TyName" "PlutusCore.Name.Unique" "plutus-core-1.30.0.0-inplace" 'True) (C1 ('MetaCons "TyName" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)))
type Unwrapped TyName 
Instance details

Defined in PlutusCore.Name.Unique

type Unwrapped TyName = GUnwrapped (Rep TyName)

data Name Source #

A Name represents variables/names in Plutus Core.

Constructors

Name 

Fields

  • _nameText ∷ Text

    The identifier name, for use in error messages.

  • _nameUniqueUnique

    A Unique assigned to the name, allowing for cheap comparisons in the compiler.

Instances

Instances details
Generic Name 
Instance details

Defined in PlutusCore.Name.Unique

Associated Types

type Rep NameTypeType Source #

Methods

fromNameRep Name x Source #

toRep Name x → Name Source #

Show Name 
Instance details

Defined in PlutusCore.Name.Unique

Methods

showsPrecIntNameShowS Source #

showNameString Source #

showList ∷ [Name] → ShowS Source #

NFData Name 
Instance details

Defined in PlutusCore.Name.Unique

Methods

rnfName → () Source #

Eq Name 
Instance details

Defined in PlutusCore.Name.Unique

Methods

(==)NameNameBool Source #

(/=)NameNameBool Source #

Ord Name 
Instance details

Defined in PlutusCore.Name.Unique

Methods

compareNameNameOrdering Source #

(<)NameNameBool Source #

(<=)NameNameBool Source #

(>)NameNameBool Source #

(>=)NameNameBool Source #

maxNameNameName Source #

minNameNameName Source #

Hashable Name 
Instance details

Defined in PlutusCore.Name.Unique

Methods

hashWithSaltIntNameInt

hashNameInt

ToScopedName Name 
Instance details

Defined in PlutusCore.Check.Scoping

HasText Name 
Instance details

Defined in PlutusCore.Name.Unique

Methods

theTextLens' Name Text Source #

HasUnique Name TermUnique 
Instance details

Defined in PlutusCore.Name.Unique

HasPrettyConfigName config ⇒ PrettyBy config Name 
Instance details

Defined in PlutusCore.Name.Unique

Methods

prettyBy ∷ config → NameDoc ann Source #

prettyListBy ∷ config → [Name] → Doc ann Source #

Lift Name 
Instance details

Defined in PlutusCore.Name.Unique

Methods

liftQuote m ⇒ Name → m Exp Source #

liftTyped ∷ ∀ (m ∷ TypeType). Quote m ⇒ NameCode m Name Source #

name ~ NameReference Name (Binding tyname name uni fun) Source #

Unlike other Reference instances this one does not guarantee that the name will actually be referenced, but it's too convenient to have this instance to give up on it, without it would be awkward to express "reference this binding in this thing".

Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name0. ToScopedName name0 ⇒ name0 → NameAnn) → NameBinding tyname name uni fun NameAnnBinding tyname name uni fun NameAnn Source #

name ~ NameReference Name (Term tyname name uni fun) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name0. ToScopedName name0 ⇒ name0 → NameAnn) → NameTerm tyname name uni fun NameAnnTerm tyname name uni fun NameAnn Source #

AsTypeError (Error uni fun ann) (Term TyName Name uni fun ()) uni fun ann 
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 #

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

Defined in PlutusIR.Compiler.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 #

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

Defined in PlutusIR.Error

Methods

_TypeError ∷ Prism' (Error uni fun a) (TypeError (Term TyName Name uni fun ()) uni fun a) Source #

_KindMismatch ∷ Prism' (Error uni fun a) (a, Type TyName uni (), ExpectedShapeOr (Kind ()), Kind ()) Source #

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

_TyNameMismatch ∷ Prism' (Error uni fun a) (a, TyName, TyName) Source #

_NameMismatch ∷ Prism' (Error uni fun a) (a, Name, Name) Source #

_FreeTypeVariableE ∷ Prism' (Error uni fun a) (a, TyName) Source #

_FreeVariableE ∷ Prism' (Error uni fun a) (a, Name) Source #

_UnknownBuiltinFunctionE ∷ Prism' (Error uni fun a) (a, fun) Source #

(Reference TyName t, Reference Name t) ⇒ Reference (Datatype TyName Name uni ann) t Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name. ToScopedName name ⇒ name → NameAnn) → Datatype TyName Name uni ann → t NameAnn → t NameAnn Source #

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

Defined in PlutusCore.Builtin.HasConstant

Methods

asConstantTerm TyName Name uni fun () → Either BuiltinError (Some (ValueOf (UniOf (Term TyName Name uni fun ())))) Source #

fromConstantSome (ValueOf (UniOf (Term TyName Name uni fun ()))) → Term TyName Name uni fun () Source #

(Reference TyName t, Reference Name t) ⇒ Reference (Binding TyName Name uni fun ann) t Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name. ToScopedName name ⇒ name → NameAnn) → Binding TyName Name uni fun ann → t NameAnn → t NameAnn Source #

type Rep Name 
Instance details

Defined in PlutusCore.Name.Unique

type Rep Name = D1 ('MetaData "Name" "PlutusCore.Name.Unique" "plutus-core-1.30.0.0-inplace" 'False) (C1 ('MetaCons "Name" 'PrefixI 'True) (S1 ('MetaSel ('Just "_nameText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_nameUnique") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Unique)))

data VarDecl tyname name (uni ∷ TypeType) ann Source #

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

Constructors

VarDecl 

Fields

Instances

Instances details
tyname ~ TyNameReference TyName (VarDecl tyname name uni) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name0. ToScopedName name0 ⇒ name0 → NameAnn) → TyNameVarDecl tyname name uni NameAnnVarDecl tyname name uni NameAnn Source #

(PrettyClassicBy configName tyname, PrettyClassicBy configName name, PrettyParens (SomeTypeIn uni), Pretty ann) ⇒ PrettyBy (PrettyConfigClassic configName) (VarDecl tyname name uni ann) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

prettyByPrettyConfigClassic configName → VarDecl tyname name uni ann → Doc ann0 Source #

prettyListByPrettyConfigClassic configName → [VarDecl tyname name uni ann] → Doc ann0 Source #

Functor (VarDecl tyname name uni) 
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 #

(tyname ~ TyName, name ~ Name) ⇒ CollectScopeInfo (VarDecl tyname name uni) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

collectScopeInfoVarDecl tyname name uni NameAnnScopeErrorOrInfo Source #

Generic (VarDecl tyname name uni ann) 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

type Rep (VarDecl tyname name uni ann) ∷ TypeType Source #

Methods

fromVarDecl tyname name uni ann → Rep (VarDecl tyname name uni ann) x Source #

toRep (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) 
Instance details

Defined in PlutusCore.Core.Type

Methods

showsPrecIntVarDecl tyname name uni ann → ShowS Source #

showVarDecl tyname name uni ann → String Source #

showList ∷ [VarDecl tyname name uni ann] → ShowS Source #

(PrettyClassic tyname, PrettyClassic name, PrettyParens (SomeTypeIn uni), Pretty ann) ⇒ Pretty (VarDecl tyname name uni ann) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

prettyVarDecl tyname name uni ann → Doc ann0 #

prettyList ∷ [VarDecl tyname name uni ann] → Doc ann0 #

Reference name t ⇒ Reference (VarDecl tyname name uni ann) t Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name0. ToScopedName name0 ⇒ name0 → NameAnn) → VarDecl tyname name uni ann → t NameAnn → t NameAnn Source #

HasUnique name TermUniqueHasUnique (VarDecl tyname name uni ann) TermUnique 
Instance details

Defined in PlutusCore.Core.Type

Methods

uniqueLens' (VarDecl tyname name uni ann) TermUnique Source #

type Rep (VarDecl tyname name uni ann) 
Instance details

Defined in PlutusCore.Core.Type

type Rep (VarDecl tyname name uni ann) = D1 ('MetaData "VarDecl" "PlutusCore.Core.Type" "plutus-core-1.30.0.0-inplace" '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 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) 
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 #

tyname ~ TyNameCollectScopeInfo (TyVarDecl tyname) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

(PrettyClassicBy configName tyname, Pretty ann) ⇒ PrettyBy (PrettyConfigClassic configName) (TyVarDecl tyname ann) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

prettyByPrettyConfigClassic configName → TyVarDecl tyname ann → Doc ann0 Source #

prettyListByPrettyConfigClassic configName → [TyVarDecl tyname ann] → Doc ann0 Source #

Generic (TyVarDecl tyname ann) 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

type Rep (TyVarDecl tyname ann) ∷ TypeType Source #

Methods

fromTyVarDecl tyname ann → Rep (TyVarDecl tyname ann) x Source #

toRep (TyVarDecl tyname ann) x → TyVarDecl tyname ann Source #

(Show ann, Show tyname) ⇒ Show (TyVarDecl tyname ann) 
Instance details

Defined in PlutusCore.Core.Type

Methods

showsPrecIntTyVarDecl tyname ann → ShowS Source #

showTyVarDecl tyname ann → String Source #

showList ∷ [TyVarDecl tyname ann] → ShowS Source #

(PrettyClassic tyname, Pretty ann) ⇒ Pretty (TyVarDecl tyname ann) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

prettyTyVarDecl tyname ann → Doc ann0 #

prettyList ∷ [TyVarDecl tyname ann] → Doc ann0 #

Reference tyname t ⇒ Reference (TyVarDecl tyname ann) t Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name. ToScopedName name ⇒ name → NameAnn) → TyVarDecl tyname ann → t NameAnn → t NameAnn Source #

HasUnique tyname TypeUniqueHasUnique (TyVarDecl tyname ann) TypeUnique 
Instance details

Defined in PlutusCore.Core.Type

Methods

uniqueLens' (TyVarDecl tyname ann) TypeUnique Source #

type Rep (TyVarDecl tyname ann) 
Instance details

Defined in PlutusCore.Core.Type

type Rep (TyVarDecl tyname ann) = D1 ('MetaData "TyVarDecl" "PlutusCore.Core.Type" "plutus-core-1.30.0.0-inplace" '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 Kind ann Source #

Constructors

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

Instances

Instances details
Functor Kind 
Instance details

Defined in PlutusCore.Core.Type

Methods

fmap ∷ (a → b) → Kind a → Kind b Source #

(<$) ∷ a → Kind b → Kind a Source #

Lift ann ⇒ Lift (Kind ann ∷ Type) 
Instance details

Defined in PlutusCore.Core.Type

Methods

liftQuote m ⇒ Kind ann → m Exp Source #

liftTyped ∷ ∀ (m ∷ TypeType). Quote m ⇒ Kind ann → Code m (Kind ann) Source #

Generic (Kind ann) 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

type Rep (Kind ann) ∷ TypeType Source #

Methods

fromKind ann → Rep (Kind ann) x Source #

toRep (Kind ann) x → Kind ann Source #

Show ann ⇒ Show (Kind ann) 
Instance details

Defined in PlutusCore.Core.Type

Methods

showsPrecIntKind ann → ShowS Source #

showKind ann → String Source #

showList ∷ [Kind ann] → ShowS Source #

NFData ann ⇒ NFData (Kind ann) 
Instance details

Defined in PlutusCore.Core.Type

Methods

rnfKind ann → () Source #

Eq ann ⇒ Eq (Kind ann) 
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) 
Instance details

Defined in PlutusCore.Core.Type

Methods

hashWithSaltIntKind ann → Int

hashKind ann → Int

type Rep (Kind ann) 
Instance details

Defined in PlutusCore.Core.Type

type HasUniques (Kind ann) 
Instance details

Defined in PlutusCore.Core.Type

type HasUniques (Kind ann) = ()

data Type tyname (uni ∷ TypeType) 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
Functor (Type tyname uni) 
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 #

Generic (Type tyname uni ann) 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

type Rep (Type tyname uni ann) ∷ TypeType Source #

Methods

fromType tyname uni ann → Rep (Type tyname uni ann) x Source #

toRep (Type tyname uni ann) x → Type tyname uni ann Source #

(GShow uni, Show tyname, Show ann) ⇒ Show (Type tyname uni ann) 
Instance details

Defined in PlutusCore.Core.Type

Methods

showsPrecIntType tyname uni ann → ShowS Source #

showType tyname uni ann → String Source #

showList ∷ [Type tyname uni ann] → ShowS Source #

(NFData ann, NFData tyname, Closed uni) ⇒ NFData (Type tyname uni ann) 
Instance details

Defined in PlutusCore.Core.Type

Methods

rnfType tyname uni ann → () Source #

HasUniques (Type tyname uni ann) ⇒ Rename (Type tyname uni ann) 
Instance details

Defined in PlutusCore.Rename

Methods

renameMonadQuote m ⇒ Type tyname uni ann → m (Type tyname uni ann) Source #

type Rep (Type tyname uni ann) 
Instance details

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

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

data Datatype tyname name uni a Source #

Constructors

Datatype a (TyVarDecl tyname a) [TyVarDecl tyname a] name [VarDecl tyname name uni a] 

Instances

Instances details
tyname ~ TyNameReference TyName (Datatype tyname name uni) Source #

Scoping for data types is hard, so we employ some extra paranoia and reference the provided TyName in the type of every single constructor, and also apply the final head to that TyName.

Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name0. ToScopedName name0 ⇒ name0 → NameAnn) → TyNameDatatype tyname name uni NameAnnDatatype tyname name uni NameAnn Source #

(PrettyClassicBy configName tyname, PrettyClassicBy configName name, PrettyParens (SomeTypeIn uni), Pretty ann) ⇒ PrettyBy (PrettyConfigClassic configName) (Datatype tyname name uni ann) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

prettyByPrettyConfigClassic configName → Datatype tyname name uni ann → Doc ann0 Source #

prettyListByPrettyConfigClassic configName → [Datatype tyname name uni ann] → Doc ann0 Source #

PrettyConstraints configName tyname name uni ⇒ PrettyBy (PrettyConfigReadable configName) (Datatype tyname name uni ann) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty.Readable

Methods

prettyByPrettyConfigReadable configName → Datatype tyname name uni ann → Doc ann0 Source #

prettyListByPrettyConfigReadable configName → [Datatype tyname name uni ann] → Doc ann0 Source #

Functor (Datatype tyname name uni) Source # 
Instance details

Defined in PlutusIR.Core.Type

Methods

fmap ∷ (a → b) → Datatype tyname name uni a → Datatype tyname name uni b Source #

(<$) ∷ a → Datatype tyname name uni b → Datatype tyname name uni a Source #

(tyname ~ TyName, name ~ Name) ⇒ CollectScopeInfo (Datatype tyname name uni) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

collectScopeInfoDatatype tyname name uni NameAnnScopeErrorOrInfo Source #

Generic (Datatype tyname name uni a) Source # 
Instance details

Defined in PlutusIR.Core.Type

Associated Types

type Rep (Datatype tyname name uni a) ∷ TypeType Source #

Methods

fromDatatype tyname name uni a → Rep (Datatype tyname name uni a) x Source #

toRep (Datatype tyname name uni a) x → Datatype tyname name uni a Source #

(Show a, Show tyname, Show name, GShow uni) ⇒ Show (Datatype tyname name uni a) Source # 
Instance details

Defined in PlutusIR.Core.Type

Methods

showsPrecIntDatatype tyname name uni a → ShowS Source #

showDatatype tyname name uni a → String Source #

showList ∷ [Datatype tyname name uni a] → ShowS Source #

(Closed uni, Everywhere uni Flat, Flat a, Flat tyname, Flat name) ⇒ Flat (Datatype tyname name uni a) 
Instance details

Defined in PlutusIR.Core.Instance.Flat

Methods

encodeDatatype tyname name uni a → Encoding

decode ∷ Get (Datatype tyname name uni a)

sizeDatatype tyname name uni a → NumBits → NumBits

(PrettyClassic tyname, PrettyClassic name, PrettyUni uni, Pretty ann) ⇒ Pretty (Datatype tyname name uni ann) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

prettyDatatype tyname name uni ann → Doc ann0 #

prettyList ∷ [Datatype tyname name uni ann] → Doc ann0 #

(Reference TyName t, Reference Name t) ⇒ Reference (Datatype TyName Name uni ann) t Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name. ToScopedName name ⇒ name → NameAnn) → Datatype TyName Name uni ann → t NameAnn → t NameAnn Source #

type Rep (Datatype tyname name uni a) Source # 
Instance details

Defined in PlutusIR.Core.Type

data Recursivity Source #

Each multi-let-group has to be marked with its scoping: * NonRec: the identifiers introduced by this multi-let are only linearly-scoped, i.e. an identifier cannot refer to itself or later-introduced identifiers of the group. * Rec: an identifiers introduced by this multi-let group can use all other multi-lets of the same group (including itself), thus permitting (mutual) recursion.

Constructors

NonRec 
Rec 

Instances

Instances details
Semigroup Recursivity Source #

Recursivity can form a Semigroup / lattice, where NonRec < Rec. The lattice is ordered by "power": a non-recursive binding group can be made recursive and it will still work, but not vice versa. The semigroup operation is the "join" of the lattice.

Instance details

Defined in PlutusIR.Core.Type

Generic Recursivity Source # 
Instance details

Defined in PlutusIR.Core.Type

Associated Types

type Rep RecursivityTypeType Source #

Show Recursivity Source # 
Instance details

Defined in PlutusIR.Core.Type

Flat Recursivity 
Instance details

Defined in PlutusIR.Core.Instance.Flat

Methods

encodeRecursivity → Encoding

decode ∷ Get Recursivity

sizeRecursivity → NumBits → NumBits

Eq Recursivity Source # 
Instance details

Defined in PlutusIR.Core.Type

Ord Recursivity Source # 
Instance details

Defined in PlutusIR.Core.Type

Hashable Recursivity Source # 
Instance details

Defined in PlutusIR.Core.Type

Methods

hashWithSaltIntRecursivityInt

hashRecursivityInt

PrettyBy (PrettyConfigClassic configName) Recursivity Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

prettyByPrettyConfigClassic configName → RecursivityDoc ann Source #

prettyListByPrettyConfigClassic configName → [Recursivity] → Doc ann Source #

type Rep Recursivity Source # 
Instance details

Defined in PlutusIR.Core.Type

type Rep Recursivity = D1 ('MetaData "Recursivity" "PlutusIR.Core.Type" "plutus-core-1.30.0.0-inplace-plutus-ir" 'False) (C1 ('MetaCons "NonRec" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Rec" 'PrefixI 'False) (U1TypeType))

data Strictness Source #

Constructors

NonStrict 
Strict 

Instances

Instances details
Generic Strictness Source # 
Instance details

Defined in PlutusIR.Core.Type

Associated Types

type Rep StrictnessTypeType Source #

Show Strictness Source # 
Instance details

Defined in PlutusIR.Core.Type

Flat Strictness 
Instance details

Defined in PlutusIR.Core.Instance.Flat

Methods

encodeStrictness → Encoding

decode ∷ Get Strictness

sizeStrictness → NumBits → NumBits

Eq Strictness Source # 
Instance details

Defined in PlutusIR.Core.Type

PrettyBy (PrettyConfigClassic configName) Strictness Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

prettyByPrettyConfigClassic configName → StrictnessDoc ann Source #

prettyListByPrettyConfigClassic configName → [Strictness] → Doc ann Source #

type Rep Strictness Source # 
Instance details

Defined in PlutusIR.Core.Type

type Rep Strictness = D1 ('MetaData "Strictness" "PlutusIR.Core.Type" "plutus-core-1.30.0.0-inplace-plutus-ir" 'False) (C1 ('MetaCons "NonStrict" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Strict" 'PrefixI 'False) (U1TypeType))

data Binding tyname name uni fun a Source #

Constructors

TermBind a Strictness (VarDecl tyname name uni a) (Term tyname name uni fun a) 
TypeBind a (TyVarDecl tyname a) (Type tyname uni a) 
DatatypeBind a (Datatype tyname name uni a) 

Instances

Instances details
name ~ NameReference Name (Binding tyname name uni fun) Source #

Unlike other Reference instances this one does not guarantee that the name will actually be referenced, but it's too convenient to have this instance to give up on it, without it would be awkward to express "reference this binding in this thing".

Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name0. ToScopedName name0 ⇒ name0 → NameAnn) → NameBinding tyname name uni fun NameAnnBinding tyname name uni fun NameAnn Source #

tyname ~ TyNameReference TyName (Binding tyname name uni fun) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name0. ToScopedName name0 ⇒ name0 → NameAnn) → TyNameBinding tyname name uni fun NameAnnBinding tyname name uni fun NameAnn Source #

(PrettyClassicBy configName tyname, PrettyClassicBy configName name, PrettyUni uni, Pretty fun, Pretty ann) ⇒ PrettyBy (PrettyConfigClassic configName) (Binding tyname name uni fun ann) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

prettyByPrettyConfigClassic configName → Binding tyname name uni fun ann → Doc ann0 Source #

prettyListByPrettyConfigClassic configName → [Binding tyname name uni fun ann] → Doc ann0 Source #

(PrettyConstraints configName tyname name uni, Pretty fun) ⇒ PrettyBy (PrettyConfigReadable configName) (Binding tyname name uni fun ann) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty.Readable

Methods

prettyByPrettyConfigReadable configName → Binding tyname name uni fun ann → Doc ann0 Source #

prettyListByPrettyConfigReadable configName → [Binding tyname name uni fun ann] → Doc ann0 Source #

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

Defined in PlutusIR.Core.Type

Methods

fmap ∷ (a → b) → Binding tyname name uni fun a → Binding tyname name uni fun b Source #

(<$) ∷ a → Binding tyname name uni fun b → Binding tyname name uni fun a Source #

(tyname ~ TyName, name ~ Name) ⇒ CollectScopeInfo (Binding tyname name uni fun) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

collectScopeInfoBinding tyname name uni fun NameAnnScopeErrorOrInfo Source #

Generic (Binding tyname name uni fun a) Source # 
Instance details

Defined in PlutusIR.Core.Type

Associated Types

type Rep (Binding tyname name uni fun a) ∷ TypeType Source #

Methods

fromBinding tyname name uni fun a → Rep (Binding tyname name uni fun a) x Source #

toRep (Binding tyname name uni fun a) x → Binding tyname name uni fun a Source #

(Show tyname, Show name, GShow uni, Everywhere uni Show, Show fun, Show a, Closed uni) ⇒ Show (Binding tyname name uni fun a) Source # 
Instance details

Defined in PlutusIR.Core.Type

Methods

showsPrecIntBinding tyname name uni fun a → ShowS Source #

showBinding tyname name uni fun a → String Source #

showList ∷ [Binding tyname name uni fun a] → ShowS Source #

(Closed uni, Everywhere uni Flat, Flat fun, Flat a, Flat tyname, Flat name) ⇒ Flat (Binding tyname name uni fun a) 
Instance details

Defined in PlutusIR.Core.Instance.Flat

Methods

encodeBinding tyname name uni fun a → Encoding

decode ∷ Get (Binding tyname name uni fun a)

sizeBinding tyname name uni fun a → NumBits → NumBits

(PrettyClassic tyname, PrettyClassic name, PrettyUni uni, Pretty fun, Pretty ann) ⇒ Pretty (Binding tyname name uni fun ann) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

prettyBinding tyname name uni fun ann → Doc ann0 #

prettyList ∷ [Binding tyname name uni fun ann] → Doc ann0 #

(Reference TyName t, Reference Name t) ⇒ Reference (Binding TyName Name uni fun ann) t Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name. ToScopedName name ⇒ name → NameAnn) → Binding TyName Name uni fun ann → t NameAnn → t NameAnn Source #

type Rep (Binding tyname name uni fun a) Source # 
Instance details

Defined in PlutusIR.Core.Type

data Term tyname name uni fun a Source #

Constructors

Let a Recursivity (NonEmpty (Binding tyname name uni fun a)) (Term tyname name uni fun a) 
Var a name 
TyAbs a tyname (Kind a) (Term tyname name uni fun a) 
LamAbs a name (Type tyname uni a) (Term tyname name uni fun a) 
Apply a (Term tyname name uni fun a) (Term tyname name uni fun a) 
Constant a (Some (ValueOf uni)) 
Builtin a fun 
TyInst a (Term tyname name uni fun a) (Type tyname uni a) 
Error a (Type tyname uni a) 
IWrap a (Type tyname uni a) (Type tyname uni a) (Term tyname name uni fun a) 
Unwrap a (Term tyname name uni fun a) 
Constr a (Type tyname uni a) Word64 [Term tyname name uni fun a] 
Case a (Type tyname uni a) (Term tyname name uni fun a) [Term tyname name uni fun a] 

Instances

Instances details
name ~ NameReference Name (Term tyname name uni fun) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name0. ToScopedName name0 ⇒ name0 → NameAnn) → NameTerm tyname name uni fun NameAnnTerm tyname name uni fun NameAnn Source #

tyname ~ TyNameReference TyName (Term tyname name uni fun) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name0. ToScopedName name0 ⇒ name0 → NameAnn) → TyNameTerm tyname name uni fun NameAnnTerm 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 PlutusIR.Core.Instance.Pretty

Methods

prettyByPrettyConfigPlcTerm tyname name uni fun ann → Doc ann0 Source #

prettyListByPrettyConfigPlc → [Term tyname name uni fun ann] → Doc ann0 Source #

(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 PlutusIR.Core.Instance.Pretty

Methods

prettyByPrettyConfigClassic configName → Term tyname name uni fun ann → Doc ann0 Source #

prettyListByPrettyConfigClassic configName → [Term tyname name uni fun ann] → Doc ann0 Source #

(PrettyConstraints configName tyname name uni, Pretty fun) ⇒ PrettyBy (PrettyConfigReadable configName) (Term tyname name uni fun a) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty.Readable

Methods

prettyByPrettyConfigReadable configName → Term tyname name uni fun a → Doc ann Source #

prettyListByPrettyConfigReadable configName → [Term tyname name uni fun a] → Doc ann Source #

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

Defined in PlutusIR.Error

Methods

_TypeError ∷ Prism' (Error uni fun a) (TypeError (Term TyName Name uni fun ()) uni fun a) Source #

_KindMismatch ∷ Prism' (Error uni fun a) (a, Type TyName uni (), ExpectedShapeOr (Kind ()), Kind ()) Source #

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

_TyNameMismatch ∷ Prism' (Error uni fun a) (a, TyName, TyName) Source #

_NameMismatch ∷ Prism' (Error uni fun a) (a, Name, Name) Source #

_FreeTypeVariableE ∷ Prism' (Error uni fun a) (a, TyName) Source #

_FreeVariableE ∷ Prism' (Error uni fun a) (a, Name) Source #

_UnknownBuiltinFunctionE ∷ Prism' (Error uni fun a) (a, fun) Source #

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

Defined in PlutusIR.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 PlutusIR.Core.Instance.Scoping

Methods

collectScopeInfoTerm tyname name uni fun NameAnnScopeErrorOrInfo Source #

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

Defined in PlutusIR.Core.Instance.Scoping

Methods

establishScopingTerm 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 PlutusIR.Core.Type

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 a) Source # 
Instance details

Defined in PlutusIR.Core.Type

Associated Types

type Rep (Term tyname name uni fun a) ∷ TypeType Source #

Methods

fromTerm tyname name uni fun a → Rep (Term tyname name uni fun a) x Source #

toRep (Term tyname name uni fun a) x → Term tyname name uni fun a Source #

(Show tyname, Show name, GShow uni, Everywhere uni Show, Show fun, Show a, Closed uni) ⇒ Show (Term tyname name uni fun a) Source # 
Instance details

Defined in PlutusIR.Core.Type

Methods

showsPrecIntTerm tyname name uni fun a → ShowS Source #

showTerm tyname name uni fun a → String Source #

showList ∷ [Term tyname name uni fun a] → ShowS Source #

(Closed uni, Everywhere uni Flat, Flat fun, Flat a, Flat tyname, Flat name) ⇒ Flat (Term tyname name uni fun a) 
Instance details

Defined in PlutusIR.Core.Instance.Flat

Methods

encodeTerm tyname name uni fun a → Encoding

decode ∷ Get (Term tyname name uni fun a)

sizeTerm tyname name uni fun a → NumBits → NumBits

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

Defined in PlutusIR.Core.Type

Methods

asConstantTerm tyname name uni fun () → Either BuiltinError (Some (ValueOf (UniOf (Term tyname name uni fun ())))) Source #

fromConstantSome (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 PlutusIR.Core.Type

Methods

memoryUsageTerm 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 PlutusIR.Transform.Rename

Methods

renameMonadQuote 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 PlutusIR.Core.Instance.Pretty

Methods

prettyTerm tyname name uni fun ann → Doc ann0 #

prettyList ∷ [Term tyname name uni fun ann] → Doc ann0 #

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

Defined in PlutusIR.Core.Type

type Rep (Term tyname name uni fun a) = D1 ('MetaData "Term" "PlutusIR.Core.Type" "plutus-core-1.30.0.0-inplace-plutus-ir" 'False) (((C1 ('MetaCons "Let" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Recursivity)) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (Binding tyname name uni fun a))) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun a)))) :+: (C1 ('MetaCons "Var" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 name)) :+: C1 ('MetaCons "TyAbs" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tyname)) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind a)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun a)))))) :+: (C1 ('MetaCons "LamAbs" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 name)) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni a)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun a)))) :+: (C1 ('MetaCons "Apply" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun a)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun a)))) :+: C1 ('MetaCons "Constant" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Some (ValueOf uni))))))) :+: ((C1 ('MetaCons "Builtin" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 fun)) :+: (C1 ('MetaCons "TyInst" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun a)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni a)))) :+: C1 ('MetaCons "Error" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni a))))) :+: ((C1 ('MetaCons "IWrap" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni a))) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni a)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun a)))) :+: C1 ('MetaCons "Unwrap" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun a)))) :+: (C1 ('MetaCons "Constr" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni a))) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Term tyname name uni fun a]))) :+: C1 ('MetaCons "Case" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni a))) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun a)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Term tyname name uni fun a])))))))
type HasUniques (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusIR.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 PlutusIR.Core.Type

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

data Program tyname name uni fun ann Source #

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 PlutusIR.Core.Instance.Pretty

Methods

prettyByPrettyConfigPlcProgram tyname name uni fun ann → Doc ann0 Source #

prettyListByPrettyConfigPlc → [Program tyname name uni fun ann] → Doc ann0 Source #

(PrettyClassicBy configName tyname, PrettyClassicBy configName name, PrettyUni uni, Pretty fun, Pretty ann) ⇒ PrettyBy (PrettyConfigClassic configName) (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

prettyByPrettyConfigClassic configName → Program tyname name uni fun ann → Doc ann0 Source #

prettyListByPrettyConfigClassic configName → [Program tyname name uni fun ann] → Doc ann0 Source #

(PrettyConstraints configName tyname name uni, Pretty fun) ⇒ PrettyBy (PrettyConfigReadable configName) (Program tyname name uni fun a) Source # 
Instance details

Defined in PlutusIR.Core.Instance.Pretty.Readable

Methods

prettyByPrettyConfigReadable configName → Program tyname name uni fun a → Doc ann Source #

prettyListByPrettyConfigReadable configName → [Program tyname name uni fun a] → Doc ann Source #

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

Defined in PlutusIR.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 PlutusIR.Core.Instance.Scoping

Methods

collectScopeInfoProgram tyname name uni fun NameAnnScopeErrorOrInfo Source #

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

Defined in PlutusIR.Core.Instance.Scoping

Methods

establishScopingProgram 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 PlutusIR.Core.Type

Associated Types

type Rep (Program tyname name uni fun ann) ∷ TypeType Source #

Methods

fromProgram tyname name uni fun ann → Rep (Program tyname name uni fun ann) x Source #

toRep (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 PlutusIR.Core.Type

Methods

showsPrecIntProgram tyname name uni fun ann → ShowS Source #

showProgram tyname name uni fun ann → String Source #

showList ∷ [Program tyname name uni fun ann] → ShowS Source #

(Closed uni, Everywhere uni Flat, Flat fun, Flat a, Flat tyname, Flat name) ⇒ Flat (Program tyname name uni fun a) 
Instance details

Defined in PlutusIR.Core.Instance.Flat

Methods

encodeProgram tyname name uni fun a → Encoding

decode ∷ Get (Program tyname name uni fun a)

sizeProgram tyname name uni fun a → NumBits → NumBits

HasUniques (Term tyname name uni fun ann) ⇒ Rename (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusIR.Transform.Rename

Methods

renameMonadQuote 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 PlutusIR.Core.Instance.Pretty

Methods

prettyProgram 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 PlutusIR.Core.Type

type Rep (Program tyname name uni fun ann) = D1 ('MetaData "Program" "PlutusIR.Core.Type" "plutus-core-1.30.0.0-inplace-plutus-ir" 'False) (C1 ('MetaCons "Program" 'PrefixI 'True) (S1 ('MetaSel ('Just "_progAnn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Just "_progVersion") '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 PlutusIR.Core.Type

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

data Version Source #

The version of Plutus Core used by this program.

The intention is to convey different levels of backwards compatibility for existing scripts: - Major version changes are backwards-incompatible - Minor version changes are backwards-compatible - Patch version changes should be entirely invisible (and we will likely not use this level)

The version used should be changed only when the language itself changes. For example, adding a new kind of term to the language would require a minor version bump; removing a kind of term would require a major version bump.

Similarly, changing the semantics of the language will require a version bump, typically a major one. This is the main reason why the version is actually tracked in the AST: we can have two language versions with identical ASTs but different semantics, so we need to track the version explicitly.

Compatibility is about compatibility for specific scripts, not about e.g. tools which consume scripts. Adding a new kind of term does not change how existing scripts behave, but does change what tools would need to do to process scripts.

Instances

Instances details
Generic Version 
Instance details

Defined in PlutusCore.Version

Associated Types

type Rep VersionTypeType Source #

Methods

fromVersionRep Version x Source #

toRep Version x → Version Source #

Show Version 
Instance details

Defined in PlutusCore.Version

NFData Version 
Instance details

Defined in PlutusCore.Version

Methods

rnfVersion → () Source #

Eq Version 
Instance details

Defined in PlutusCore.Version

Methods

(==)VersionVersionBool Source #

(/=)VersionVersionBool Source #

Ord Version 
Instance details

Defined in PlutusCore.Version

Hashable Version 
Instance details

Defined in PlutusCore.Version

Methods

hashWithSaltIntVersionInt

hashVersionInt

Pretty Version 
Instance details

Defined in PlutusCore.Version

Methods

prettyVersionDoc ann #

prettyList ∷ [Version] → Doc ann #

type Rep Version 
Instance details

Defined in PlutusCore.Version

type Rep Version = D1 ('MetaData "Version" "PlutusCore.Version" "plutus-core-1.30.0.0-inplace" 'False) (C1 ('MetaCons "Version" 'PrefixI 'True) (S1 ('MetaSel ('Just "_versionMajor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: (S1 ('MetaSel ('Just "_versionMinor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "_versionPatch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural))))

applyProgram ∷ (MonadError ApplyProgramError m, Semigroup a) ⇒ Program tyname name uni fun a → Program tyname name uni fun a → m (Program tyname name uni fun a) Source #

Applies one program to another. Fails if the versions do not match and tries to merge annotations.

termAnnTerm tyname name uni fun a → a Source #

bindingAnnBinding tyname name uni fun a → a Source #

progAnn ∷ ∀ tyname name uni fun ann. Lens' (Program tyname name uni fun ann) ann Source #

progVersion ∷ ∀ tyname name uni fun ann. Lens' (Program tyname name uni fun ann) Version Source #

progTerm ∷ ∀ 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 #