Safe Haskell | None |
---|---|
Language | Haskell2010 |
PlutusIR.Core.Type
Synopsis
- newtype TyName = TyName {}
- data Name = Name {
- nameString :: Text
- nameUnique :: Unique
- data VarDecl tyname name uni fun ann = VarDecl {
- _varDeclAnn :: ann
- _varDeclName :: name
- _varDeclType :: Type tyname uni ann
- data TyVarDecl tyname ann = TyVarDecl {
- _tyVarDeclAnn :: ann
- _tyVarDeclName :: tyname
- _tyVarDeclKind :: Kind ann
- varDeclNameString :: VarDecl tyname Name uni fun a -> String
- tyVarDeclNameString :: TyVarDecl TyName a -> String
- data Kind ann
- data Type tyname uni ann
- = TyVar ann tyname
- | TyFun ann (Type tyname uni ann) (Type tyname uni ann)
- | TyIFix ann (Type tyname uni ann) (Type tyname uni ann)
- | TyForall ann tyname (Kind ann) (Type tyname uni ann)
- | TyBuiltin ann (SomeTypeIn uni)
- | TyLam ann tyname (Kind ann) (Type tyname uni ann)
- | TyApp ann (Type tyname uni ann) (Type tyname uni ann)
- data Datatype tyname name uni fun a = Datatype a (TyVarDecl tyname a) [TyVarDecl tyname a] name [VarDecl tyname name uni fun a]
- datatypeNameString :: Datatype TyName Name uni fun a -> String
- data Recursivity
- data Strictness
- data Binding tyname name uni fun a
- = TermBind a Strictness (VarDecl tyname name uni fun a) (Term tyname name uni fun a)
- | TypeBind a (TyVarDecl tyname a) (Type tyname uni a)
- | DatatypeBind a (Datatype tyname name uni fun a)
- data Term tyname name uni fun a
- = 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)
- data Program tyname name uni fun ann = Program {}
- applyProgram :: Monoid a => Program tyname name uni fun a -> Program tyname name uni fun a -> Program tyname name uni fun a
- termAnn :: Term tyname name uni fun a -> a
- progAnn :: forall tyname name uni fun ann. Lens' (Program tyname name uni fun ann) ann
- 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)
Documentation
We use a newtype
to enforce separation between names used for types and
those used for terms.
Instances
Eq TyName Source # | |
Ord TyName Source # | |
Show TyName Source # | |
Generic TyName Source # | |
NFData TyName Source # | |
Defined in PlutusCore.Name | |
Hashable TyName Source # | |
Defined in PlutusCore.Name | |
Wrapped TyName Source # | |
Defined in PlutusCore.Name Associated Types type Unwrapped TyName | |
ToScopedName TyName Source # | |
Defined in PlutusCore.Check.Scoping Methods toScopedName :: TyName -> ScopedName Source # | |
Flat TyName | |
Lift TyName Source # | |
HasPrettyConfigName config => PrettyBy config TyName Source # | |
Defined in PlutusCore.Name | |
HasUnique TyName TypeUnique Source # | |
Defined in PlutusCore.Name | |
tyname ~ TyName => Reference TyName (Type tyname uni) Source # | |
Defined in PlutusCore.Core.Instance.Scoping Methods referenceVia :: (forall name. ToScopedName name => name -> NameAnn) -> TyName -> Type tyname uni NameAnn -> Type tyname uni NameAnn Source # | |
tyname ~ TyName => Reference TyName (Term tyname name uni fun) Source # | |
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 # | |
tyname ~ TyName => Reference TyName (Term tyname name uni fun) Source # | |
Defined in PlutusIR.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 # | |
tyname ~ TyName => Reference TyName (Binding tyname name uni fun) Source # | |
Defined in PlutusIR.Core.Instance.Scoping Methods referenceVia :: (forall name0. ToScopedName name0 => name0 -> NameAnn) -> TyName -> Binding tyname name uni fun NameAnn -> Binding tyname name uni fun NameAnn Source # | |
tyname ~ TyName => Reference TyName (Datatype tyname name uni fun) Source # | Scoping for data types is hard, so we employ some extra paranoia and reference the provided
|
Defined in PlutusIR.Core.Instance.Scoping Methods referenceVia :: (forall name0. ToScopedName name0 => name0 -> NameAnn) -> TyName -> Datatype tyname name uni fun NameAnn -> Datatype tyname name uni fun NameAnn Source # | |
tyname ~ TyName => Reference TyName (VarDecl tyname name uni fun) Source # | |
Defined in PlutusIR.Core.Instance.Scoping Methods referenceVia :: (forall name0. ToScopedName name0 => name0 -> NameAnn) -> TyName -> VarDecl tyname name uni fun NameAnn -> VarDecl tyname name uni fun NameAnn Source # | |
Flat (Binder TyName) | |
(GEq uni, Eq ann) => Eq (Type TyName uni ann) Source # | |
TermLike (Term name uni fun) TyName name uni fun Source # | |
Defined in UntypedPlutusCore.Core.Type Methods var :: ann -> name -> Term name uni fun ann Source # tyAbs :: ann -> TyName -> Kind ann -> Term name uni fun ann -> Term name uni fun ann Source # lamAbs :: ann -> name -> Type TyName uni ann -> Term name uni fun ann -> Term name uni fun ann Source # apply :: ann -> Term name uni fun ann -> Term name uni fun ann -> Term name uni fun ann Source # constant :: ann -> Some (ValueOf uni) -> Term name uni fun ann Source # builtin :: ann -> fun -> Term name uni fun ann Source # tyInst :: ann -> Term name uni fun ann -> Type TyName uni ann -> Term name uni fun ann Source # unwrap :: ann -> Term name uni fun ann -> Term name uni fun ann Source # iWrap :: ann -> Type TyName uni ann -> Type TyName uni ann -> Term name uni fun ann -> Term name uni fun ann Source # error :: ann -> Type TyName uni ann -> Term name uni fun ann Source # termLet :: ann -> TermDef (Term name uni fun) TyName name uni fun ann -> Term name uni fun ann -> Term name uni fun ann Source # typeLet :: ann -> TypeDef TyName uni ann -> Term name uni fun ann -> Term name uni fun ann Source # | |
AsTypeError (Error uni fun ann) (Term TyName Name uni fun ()) uni fun ann Source # | |
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 (), Kind (), Kind ()) Source # _TypeMismatch :: Prism' (Error uni fun ann) (ann, Term TyName Name uni fun (), Type TyName uni (), Normalized (Type TyName uni ())) 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 # | |
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 (), Kind (), Kind ()) Source # _TypeMismatch :: Prism' (Error uni fun a) (a, Term TyName Name uni fun (), Type TyName uni (), Normalized (Type TyName uni ())) 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 # | |
(GEq uni, Closed uni, Everywhere uni Eq, Eq fun, Eq ann) => Eq (Term TyName Name uni fun ann) Source # | |
HasConstant (Term TyName Name uni fun ()) Source # | |
Defined in PlutusCore.Builtin.HasConstant | |
(Reference TyName t, Reference Name t) => Reference (Binding TyName Name uni fun ann) t Source # | |
Defined in PlutusIR.Core.Instance.Scoping Methods referenceVia :: (forall name. ToScopedName name => name -> NameAnn) -> Binding TyName Name uni fun ann -> t NameAnn -> t NameAnn Source # | |
(Reference TyName t, Reference Name t) => Reference (Datatype TyName Name uni fun ann) t Source # | |
Defined in PlutusIR.Core.Instance.Scoping Methods referenceVia :: (forall name. ToScopedName name => name -> NameAnn) -> Datatype TyName Name uni fun ann -> t NameAnn -> t NameAnn Source # | |
type Rep TyName Source # | |
Defined in PlutusCore.Name | |
type Unwrapped TyName Source # | |
Defined in PlutusCore.Name |
A Name
represents variables/names in Plutus Core.
Constructors
Name | |
Fields
|
Instances
Eq Name Source # | |
Ord Name Source # | |
Show Name Source # | |
Generic Name Source # | |
NFData Name Source # | |
Defined in PlutusCore.Name | |
Hashable Name Source # | |
Defined in PlutusCore.Name | |
ToScopedName Name Source # | |
Defined in PlutusCore.Check.Scoping Methods toScopedName :: Name -> ScopedName Source # | |
Flat Name | |
Lift Name Source # | |
HasPrettyConfigName config => PrettyBy config Name Source # | |
Defined in PlutusCore.Name | |
HasUnique Name TermUnique Source # | |
Defined in PlutusCore.Name | |
name ~ Name => Reference Name (Term tyname name uni fun) Source # | |
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 # | |
name ~ Name => Reference Name (Term tyname name uni fun) Source # | |
Defined in PlutusIR.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 # | |
name ~ Name => Reference Name (Binding tyname name uni fun) Source # | Unlike other |
Defined in PlutusIR.Core.Instance.Scoping Methods referenceVia :: (forall name0. ToScopedName name0 => name0 -> NameAnn) -> Name -> Binding tyname name uni fun NameAnn -> Binding tyname name uni fun NameAnn Source # | |
Flat (Binder Name) | |
AsTypeError (Error uni fun ann) (Term TyName Name uni fun ()) uni fun ann Source # | |
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 (), Kind (), Kind ()) Source # _TypeMismatch :: Prism' (Error uni fun ann) (ann, Term TyName Name uni fun (), Type TyName uni (), Normalized (Type TyName uni ())) 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 # | |
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 (), Kind (), Kind ()) Source # _TypeMismatch :: Prism' (Error uni fun a) (a, Term TyName Name uni fun (), Type TyName uni (), Normalized (Type TyName uni ())) 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 # | |
(GEq uni, Closed uni, Everywhere uni Eq, Eq fun, Eq ann) => Eq (Term Name uni fun ann) Source # | |
(GEq uni, Closed uni, Everywhere uni Eq, Eq fun, Eq ann) => Eq (Term TyName Name uni fun ann) Source # | |
HasConstant (Term TyName Name uni fun ()) Source # | |
Defined in PlutusCore.Builtin.HasConstant | |
(Reference TyName t, Reference Name t) => Reference (Binding TyName Name uni fun ann) t Source # | |
Defined in PlutusIR.Core.Instance.Scoping Methods referenceVia :: (forall name. ToScopedName name => name -> NameAnn) -> Binding TyName Name uni fun ann -> t NameAnn -> t NameAnn Source # | |
(Reference TyName t, Reference Name t) => Reference (Datatype TyName Name uni fun ann) t Source # | |
Defined in PlutusIR.Core.Instance.Scoping Methods referenceVia :: (forall name. ToScopedName name => name -> NameAnn) -> Datatype TyName Name uni fun ann -> t NameAnn -> t NameAnn Source # | |
type Rep Name Source # | |
Defined in PlutusCore.Name type Rep Name = D1 ('MetaData "Name" "PlutusCore.Name" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) (C1 ('MetaCons "Name" 'PrefixI 'True) (S1 ('MetaSel ('Just "nameString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "nameUnique") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Unique))) |
data VarDecl tyname name uni fun ann Source #
A "variable declaration", i.e. a name and a type for a variable.
Constructors
VarDecl | |
Fields
|
Instances
tyname ~ TyName => Reference TyName (VarDecl tyname name uni fun) Source # | |
Defined in PlutusIR.Core.Instance.Scoping Methods referenceVia :: (forall name0. ToScopedName name0 => name0 -> NameAnn) -> TyName -> VarDecl tyname name uni fun NameAnn -> VarDecl tyname name uni fun NameAnn Source # | |
(PrettyClassicBy configName tyname, PrettyClassicBy configName name, GShow uni, Everywhere uni PrettyConst, Pretty ann) => PrettyBy (PrettyConfigClassic configName) (VarDecl tyname name uni fun ann) Source # | |
Defined in PlutusIR.Core.Instance.Pretty Methods prettyBy :: PrettyConfigClassic configName -> VarDecl tyname name uni fun ann -> Doc ann0 # prettyListBy :: PrettyConfigClassic configName -> [VarDecl tyname name uni fun ann] -> Doc ann0 # | |
Functor (VarDecl tyname name uni fun) Source # | |
(tyname ~ TyName, name ~ Name) => CollectScopeInfo (VarDecl tyname name uni fun) Source # | |
Defined in PlutusIR.Core.Instance.Scoping Methods collectScopeInfo :: VarDecl tyname name uni fun NameAnn -> ScopeErrorOrInfo Source # | |
(Show ann, Show name, Show tyname, GShow uni) => Show (VarDecl tyname name uni fun ann) Source # | |
Generic (VarDecl tyname name uni fun ann) Source # | |
Defined in PlutusCore.Core.Type | |
(PrettyClassic tyname, PrettyClassic name, GShow uni, Everywhere uni PrettyConst, Pretty ann) => Pretty (VarDecl tyname name uni fun ann) Source # | |
Defined in PlutusIR.Core.Instance.Pretty | |
(Closed uni, Flat fun, Flat ann, Flat tyname, Flat name) => Flat (VarDecl tyname name uni fun ann) | |
HasUnique name TermUnique => HasUnique (VarDecl tyname name uni fun ann) TermUnique Source # | |
Defined in PlutusCore.Core.Type | |
Reference name t => Reference (VarDecl tyname name uni fun ann) t Source # | |
Defined in PlutusIR.Core.Instance.Scoping Methods referenceVia :: (forall name0. ToScopedName name0 => name0 -> NameAnn) -> VarDecl tyname name uni fun ann -> t NameAnn -> t NameAnn Source # | |
type Rep (VarDecl tyname name uni fun ann) Source # | |
Defined in PlutusCore.Core.Type type Rep (VarDecl tyname name uni fun ann) = D1 ('MetaData "VarDecl" "PlutusCore.Core.Type" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" '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
Functor Kind Source # | |
CollectScopeInfo Kind Source # | |
Defined in PlutusCore.Core.Instance.Scoping Methods collectScopeInfo :: Kind NameAnn -> ScopeErrorOrInfo Source # | |
EstablishScoping Kind Source # | |
Defined in PlutusCore.Core.Instance.Scoping | |
Lift ann => Lift (Kind ann :: Type) Source # | |
DefaultPrettyPlcStrategy (Kind ann) => PrettyBy PrettyConfigPlc (Kind ann) Source # | |
Defined in PlutusCore.Core.Instance.Pretty.Plc Methods prettyBy :: PrettyConfigPlc -> Kind ann -> Doc ann0 # prettyListBy :: PrettyConfigPlc -> [Kind ann] -> Doc ann0 # | |
Eq ann => Eq (Kind ann) Source # | |
Show ann => Show (Kind ann) Source # | |
Generic (Kind ann) Source # | |
NFData ann => NFData (Kind ann) Source # | |
Defined in PlutusCore.Core.Type | |
Hashable ann => Hashable (Kind ann) Source # | |
Defined in PlutusCore.Core.Type | |
Pretty ann => Pretty (Kind ann) Source # | |
Defined in PlutusCore.Core.Instance.Pretty.Default | |
Corecursive (Kind ann) | |
Defined in PlutusCore.Core.Instance.Recursive Methods embed :: Base (Kind ann) (Kind ann) -> Kind ann ana :: (a -> Base (Kind ann) a) -> a -> Kind ann apo :: (a -> Base (Kind ann) (Either (Kind ann) a)) -> a -> Kind ann postpro :: Recursive (Kind ann) => (forall b. Base (Kind ann) b -> Base (Kind ann) b) -> (a -> Base (Kind ann) a) -> a -> Kind ann gpostpro :: (Recursive (Kind ann), Monad m) => (forall b. m (Base (Kind ann) b) -> Base (Kind ann) (m b)) -> (forall c. Base (Kind ann) c -> Base (Kind ann) c) -> (a -> Base (Kind ann) (m a)) -> a -> Kind ann | |
Recursive (Kind ann) | |
Defined in PlutusCore.Core.Instance.Recursive Methods project :: Kind ann -> Base (Kind ann) (Kind ann) cata :: (Base (Kind ann) a -> a) -> Kind ann -> a para :: (Base (Kind ann) (Kind ann, a) -> a) -> Kind ann -> a gpara :: (Corecursive (Kind ann), Comonad w) => (forall b. Base (Kind ann) (w b) -> w (Base (Kind ann) b)) -> (Base (Kind ann) (EnvT (Kind ann) w a) -> a) -> Kind ann -> a prepro :: Corecursive (Kind ann) => (forall b. Base (Kind ann) b -> Base (Kind ann) b) -> (Base (Kind ann) a -> a) -> Kind ann -> a gprepro :: (Corecursive (Kind ann), Comonad w) => (forall b. Base (Kind ann) (w b) -> w (Base (Kind ann) b)) -> (forall c. Base (Kind ann) c -> Base (Kind ann) c) -> (Base (Kind ann) (w a) -> a) -> Kind ann -> a | |
Flat ann => Flat (Kind ann) | |
PrettyBy (PrettyConfigReadable configName) (Kind a) Source # | |
Defined in PlutusCore.Core.Instance.Pretty.Readable Methods prettyBy :: PrettyConfigReadable configName -> Kind a -> Doc ann # prettyListBy :: PrettyConfigReadable configName -> [Kind a] -> Doc ann # | |
Pretty ann => PrettyBy (PrettyConfigClassic configName) (Kind ann) Source # | |
Defined in PlutusCore.Core.Instance.Pretty.Classic Methods prettyBy :: PrettyConfigClassic configName -> Kind ann -> Doc ann0 # prettyListBy :: PrettyConfigClassic configName -> [Kind ann] -> Doc ann0 # | |
type Rep (Kind ann) Source # | |
Defined in PlutusCore.Core.Type type Rep (Kind ann) = D1 ('MetaData "Kind" "PlutusCore.Core.Type" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) (C1 ('MetaCons "Type" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann)) :+: C1 ('MetaCons "KindArrow" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ann))))) | |
type Base (Kind ann) | |
Defined in PlutusCore.Core.Instance.Recursive | |
type HasUniques (Kind ann) Source # | |
Defined in PlutusCore.Core.Type |
data Type tyname uni ann Source #
A Type
assigned to expressions.
Constructors
TyVar ann tyname | |
TyFun ann (Type tyname uni ann) (Type tyname uni ann) | |
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) | |
TyBuiltin ann (SomeTypeIn uni) | Builtin type |
TyLam ann tyname (Kind ann) (Type tyname uni ann) | |
TyApp ann (Type tyname uni ann) (Type tyname uni ann) |
Instances
tyname ~ TyName => Reference TyName (Type tyname uni) Source # | |
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 # | |
Defined in PlutusCore.Core.Instance.Pretty.Plc Methods prettyBy :: PrettyConfigPlc -> Type tyname uni ann -> Doc ann0 # prettyListBy :: PrettyConfigPlc -> [Type tyname uni ann] -> Doc ann0 # | |
(PrettyReadableBy configName tyname, GShow uni) => PrettyBy (PrettyConfigReadable configName) (Type tyname uni a) Source # | |
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 # | |
(PrettyClassicBy configName tyname, GShow uni, Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Type tyname uni ann) Source # | |
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 # | |
Functor (Type tyname uni) Source # | |
tyname ~ TyName => CollectScopeInfo (Type tyname uni) Source # | |
Defined in PlutusCore.Core.Instance.Scoping Methods collectScopeInfo :: Type tyname uni NameAnn -> ScopeErrorOrInfo Source # | |
tyname ~ TyName => EstablishScoping (Type tyname uni) Source # | |
Defined in PlutusCore.Core.Instance.Scoping | |
(GEq uni, Eq ann) => Eq (Type TyName uni ann) Source # | |
(GEq uni, Closed uni, Everywhere uni Eq, Eq ann) => Eq (Type TyDeBruijn uni ann) Source # | |
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, Closed uni, Everywhere uni Eq, Eq ann) => Eq (Type NamedTyDeBruijn uni ann) Source # | |
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 # | |
(Show ann, Show tyname, GShow uni) => Show (Type tyname uni ann) Source # | |
Generic (Type tyname uni ann) Source # | |
(NFData ann, NFData tyname, Closed uni) => NFData (Type tyname uni ann) Source # | |
Defined in PlutusCore.Core.Type | |
(PrettyClassic tyname, GShow uni, Pretty ann) => Pretty (Type tyname uni ann) Source # | |
Defined in PlutusCore.Core.Instance.Pretty.Default | |
Corecursive (Type tyname uni ann) | |
Defined in PlutusCore.Core.Instance.Recursive Methods embed :: Base (Type tyname uni ann) (Type tyname uni ann) -> Type tyname uni ann ana :: (a -> Base (Type tyname uni ann) a) -> a -> Type tyname uni ann apo :: (a -> Base (Type tyname uni ann) (Either (Type tyname uni ann) a)) -> a -> Type tyname uni ann postpro :: Recursive (Type tyname uni ann) => (forall b. Base (Type tyname uni ann) b -> Base (Type tyname uni ann) b) -> (a -> Base (Type tyname uni ann) a) -> a -> Type tyname uni ann gpostpro :: (Recursive (Type tyname uni ann), Monad m) => (forall b. m (Base (Type tyname uni ann) b) -> Base (Type tyname uni ann) (m b)) -> (forall c. Base (Type tyname uni ann) c -> Base (Type tyname uni ann) c) -> (a -> Base (Type tyname uni ann) (m a)) -> a -> Type tyname uni ann | |
Recursive (Type tyname uni ann) | |
Defined in PlutusCore.Core.Instance.Recursive Methods project :: Type tyname uni ann -> Base (Type tyname uni ann) (Type tyname uni ann) cata :: (Base (Type tyname uni ann) a -> a) -> Type tyname uni ann -> a para :: (Base (Type tyname uni ann) (Type tyname uni ann, a) -> a) -> Type tyname uni ann -> a gpara :: (Corecursive (Type tyname uni ann), Comonad w) => (forall b. Base (Type tyname uni ann) (w b) -> w (Base (Type tyname uni ann) b)) -> (Base (Type tyname uni ann) (EnvT (Type tyname uni ann) w a) -> a) -> Type tyname uni ann -> a prepro :: Corecursive (Type tyname uni ann) => (forall b. Base (Type tyname uni ann) b -> Base (Type tyname uni ann) b) -> (Base (Type tyname uni ann) a -> a) -> Type tyname uni ann -> a gprepro :: (Corecursive (Type tyname uni ann), Comonad w) => (forall b. Base (Type tyname uni ann) (w b) -> w (Base (Type tyname uni ann) b)) -> (forall c. Base (Type tyname uni ann) c -> Base (Type tyname uni ann) c) -> (Base (Type tyname uni ann) (w a) -> a) -> Type tyname uni ann -> a | |
(Closed uni, Flat ann, Flat tyname) => Flat (Type tyname uni ann) | |
HasUniques (Type tyname uni ann) => Rename (Type tyname uni ann) Source # | |
Defined in PlutusCore.Rename | |
type Rep (Type tyname uni ann) Source # | |
Defined in PlutusCore.Core.Type type Rep (Type tyname uni ann) = D1 ('MetaData "Type" "PlutusCore.Core.Type" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" '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))))))) | |
type Base (Type tyname uni ann) | |
Defined in PlutusCore.Core.Instance.Recursive | |
type HasUniques (Type tyname uni ann) Source # | |
Defined in PlutusCore.Core.Type |
data Datatype tyname name uni fun a Source #
Constructors
Datatype a (TyVarDecl tyname a) [TyVarDecl tyname a] name [VarDecl tyname name uni fun a] |
Instances
tyname ~ TyName => Reference TyName (Datatype tyname name uni fun) Source # | Scoping for data types is hard, so we employ some extra paranoia and reference the provided
|
Defined in PlutusIR.Core.Instance.Scoping Methods referenceVia :: (forall name0. ToScopedName name0 => name0 -> NameAnn) -> TyName -> Datatype tyname name uni fun NameAnn -> Datatype tyname name uni fun NameAnn Source # | |
(PrettyClassicBy configName tyname, PrettyClassicBy configName name, GShow uni, Everywhere uni PrettyConst, Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Datatype tyname name uni fun ann) Source # | |
Defined in PlutusIR.Core.Instance.Pretty Methods prettyBy :: PrettyConfigClassic configName -> Datatype tyname name uni fun ann -> Doc ann0 # prettyListBy :: PrettyConfigClassic configName -> [Datatype tyname name uni fun ann] -> Doc ann0 # | |
Functor (Datatype tyname name uni fun) Source # | |
(tyname ~ TyName, name ~ Name) => CollectScopeInfo (Datatype tyname name uni fun) Source # | |
Defined in PlutusIR.Core.Instance.Scoping Methods collectScopeInfo :: Datatype tyname name uni fun NameAnn -> ScopeErrorOrInfo Source # | |
(Show a, Show tyname, Show name, GShow uni) => Show (Datatype tyname name uni fun a) Source # | |
Generic (Datatype tyname name uni fun a) Source # | |
(PrettyClassic tyname, PrettyClassic name, GShow uni, Everywhere uni PrettyConst, Pretty ann) => Pretty (Datatype tyname name uni fun ann) Source # | |
Defined in PlutusIR.Core.Instance.Pretty | |
(Closed uni, Everywhere uni Flat, Flat a, Flat tyname, Flat name, Flat fun) => Flat (Datatype tyname name uni fun a) | |
(Reference TyName t, Reference Name t) => Reference (Datatype TyName Name uni fun ann) t Source # | |
Defined in PlutusIR.Core.Instance.Scoping Methods referenceVia :: (forall name. ToScopedName name => name -> NameAnn) -> Datatype TyName Name uni fun ann -> t NameAnn -> t NameAnn Source # | |
type Rep (Datatype tyname name uni fun a) Source # | |
Defined in PlutusIR.Core.Type type Rep (Datatype tyname name uni fun a) = D1 ('MetaData "Datatype" "PlutusIR.Core.Type" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) (C1 ('MetaCons "Datatype" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TyVarDecl tyname a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TyVarDecl tyname a]) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [VarDecl tyname name uni fun a]))))) |
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.
Instances
data Strictness Source #
Instances
Eq Strictness Source # | |
Defined in PlutusIR.Core.Type Methods (==) :: Strictness -> Strictness -> Bool Source # (/=) :: Strictness -> Strictness -> Bool Source # | |
Show Strictness Source # | |
Defined in PlutusIR.Core.Type | |
Generic Strictness Source # | |
Defined in PlutusIR.Core.Type | |
Flat Strictness | |
Defined in PlutusIR.Core.Instance.Flat Methods encode :: Strictness -> Encoding decode :: Get Strictness size :: Strictness -> NumBits -> NumBits | |
PrettyBy (PrettyConfigClassic configName) Strictness Source # | |
Defined in PlutusIR.Core.Instance.Pretty Methods prettyBy :: PrettyConfigClassic configName -> Strictness -> Doc ann # prettyListBy :: PrettyConfigClassic configName -> [Strictness] -> Doc ann # | |
type Rep Strictness Source # | |
data Binding tyname name uni fun a Source #
Constructors
TermBind a Strictness (VarDecl tyname name uni fun a) (Term tyname name uni fun a) | |
TypeBind a (TyVarDecl tyname a) (Type tyname uni a) | |
DatatypeBind a (Datatype tyname name uni fun a) |
Instances
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) |
Instances
data Program tyname name uni fun ann Source #
Instances
(PrettyClassicBy configName tyname, PrettyClassicBy configName name, GShow uni, Closed uni, Everywhere uni PrettyConst, Pretty fun, Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Program tyname name uni fun ann) Source # | |
Defined in PlutusIR.Core.Instance.Pretty Methods prettyBy :: PrettyConfigClassic configName -> Program tyname name uni fun ann -> Doc ann0 # prettyListBy :: PrettyConfigClassic configName -> [Program tyname name uni fun ann] -> Doc ann0 # | |
(tyname ~ TyName, name ~ Name) => CollectScopeInfo (Program tyname name uni fun) Source # | |
Defined in PlutusIR.Core.Instance.Scoping Methods collectScopeInfo :: Program tyname name uni fun NameAnn -> ScopeErrorOrInfo Source # | |
(tyname ~ TyName, name ~ Name) => EstablishScoping (Program tyname name uni fun) Source # | |
Defined in PlutusIR.Core.Instance.Scoping | |
Generic (Program tyname name uni fun ann) Source # | |
Defined in PlutusIR.Core.Type | |
(PrettyClassic tyname, PrettyClassic name, GShow uni, Closed uni, Everywhere uni PrettyConst, Pretty fun, Pretty ann) => Pretty (Program tyname name uni fun ann) Source # | |
Defined in PlutusIR.Core.Instance.Pretty | |
(Closed uni, Everywhere uni Flat, Flat fun, Flat a, Flat tyname, Flat name) => Flat (Program tyname name uni fun a) | |
HasUniques (Term tyname name uni fun ann) => Rename (Program tyname name uni fun ann) Source # | |
Defined in PlutusIR.Transform.Rename | |
type Rep (Program tyname name uni fun ann) Source # | |
Defined in PlutusIR.Core.Type type Rep (Program tyname name uni fun ann) = D1 ('MetaData "Program" "PlutusIR.Core.Type" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) (C1 ('MetaCons "Program" 'PrefixI 'True) (S1 ('MetaSel ('Just "_progAnn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Just "_progTerm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)))) | |
type HasUniques (Program tyname name uni fun ann) Source # | |
Defined in PlutusIR.Core.Type |