plutus-core-1.0.0.1: Language library for Plutus Core
Safe Haskell None
Language Haskell2010

PlutusIR

Contents

Synopsis

AST

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

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

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 #

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

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 #

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

Defined in PlutusIR.Core.Instance.Pretty

Methods

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

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

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

Defined in PlutusIR.Error

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

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

Defined in PlutusIR.Core.Instance.Scoping

Methods

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

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

Defined in 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 #

termLet :: ann -> TermDef ( Term tyname name uni fun) tyname name uni fun 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 #

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

Defined in PlutusIR.Core.Type

Methods

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

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

showList :: [ Term tyname name uni fun a] -> ShowS 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) :: Type -> Type Source #

Methods

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

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

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

Defined in PlutusIR.Core.Instance.Flat

Methods

encode :: Term tyname name uni fun a -> Encoding Source #

decode :: Get ( Term tyname name uni fun a) Source #

size :: Term tyname name uni fun a -> NumBits -> NumBits Source #

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

Defined in PlutusIR.Core.Instance.Pretty

Methods

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

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

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

Defined in PlutusIR.Transform.Rename

Methods

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

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

Defined in PlutusIR.Core.Type

Methods

asConstant :: AsUnliftingError err => Maybe cause -> Term tyname name uni fun () -> Either ( ErrorWithCause err cause) ( Some ( ValueOf ( UniOf ( Term tyname name uni fun ())))) Source #

fromConstant :: Some ( ValueOf ( UniOf ( Term tyname name uni fun ()))) -> Term tyname name uni fun () Source #

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.0.0.1-76bWF9ZEWyb4eDyjHx0kCS" ' False ) ((( C1 (' MetaCons "Let" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Recursivity )) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( NonEmpty ( Binding tyname name uni fun a))) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Term tyname name uni fun a)))) :+: C1 (' MetaCons "Var" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 name))) :+: ( C1 (' MetaCons "TyAbs" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 tyname)) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Kind a)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Term tyname name uni fun a)))) :+: ( C1 (' MetaCons "LamAbs" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 name)) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Type tyname uni a)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Term tyname name uni fun a)))) :+: C1 (' MetaCons "Apply" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Term tyname name uni fun a)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Term tyname name uni fun a))))))) :+: (( C1 (' MetaCons "Constant" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Some ( ValueOf uni)))) :+: ( C1 (' MetaCons "Builtin" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 fun)) :+: C1 (' MetaCons "TyInst" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Term tyname name uni fun a)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Type tyname uni a)))))) :+: ( C1 (' MetaCons "Error" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Type tyname uni a))) :+: ( C1 (' MetaCons "IWrap" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Type tyname uni a))) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Type tyname uni a)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Term tyname name uni fun a)))) :+: C1 (' MetaCons "Unwrap" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Term tyname name uni fun a)))))))
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
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 )

termSubterms :: Traversal' ( Term tyname name uni fun a) ( Term tyname name uni fun a) Source #

Get all the direct child Term s of the given Term , including those within Binding s.

termSubtypes :: Traversal' ( Term tyname name uni fun a) ( Type tyname uni a) Source #

Get all the direct child Type s of the given Term , including those within Binding s.

termBindings :: Traversal' ( Term tyname name uni fun a) ( Binding tyname name uni fun a) Source #

Get all the direct child Binding s of the given Term .

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

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusCore.Core.Instance.Pretty.Plc

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

Defined in PlutusCore.Core.Instance.Pretty.Readable

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

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

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

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

Functor ( Type tyname uni) Source #
Instance details

Defined in PlutusCore.Core.Type

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Scoping

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusCore.Core.Instance.Eq

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

Defined in PlutusCore.Core.Instance.Eq

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

Defined in PlutusCore.Core.Instance.Eq

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

Defined in PlutusCore.Core.Type

Generic ( Type tyname uni ann) Source #
Instance details

Defined in PlutusCore.Core.Type

Associated Types

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

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

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

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

Defined in PlutusCore.Flat

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

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

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

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

Recursive ( Type tyname uni ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

project :: Type tyname uni ann -> Base ( Type tyname uni ann) ( Type tyname uni ann) Source #

cata :: ( Base ( Type tyname uni ann) a -> a) -> Type tyname uni ann -> a Source #

para :: ( Base ( Type tyname uni ann) ( Type tyname uni ann, a) -> a) -> Type tyname uni ann -> a Source #

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 Source #

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 Source #

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 Source #

Corecursive ( Type tyname uni ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

embed :: Base ( Type tyname uni ann) ( Type tyname uni ann) -> Type tyname uni ann Source #

ana :: (a -> Base ( Type tyname uni ann) a) -> a -> Type tyname uni ann Source #

apo :: (a -> Base ( Type tyname uni ann) ( Either ( Type tyname uni ann) a)) -> a -> Type tyname uni ann Source #

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 Source #

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 Source #

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

Defined in PlutusCore.Rename

Methods

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

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

Defined in PlutusCore.Core.Type

type Rep ( Type tyname uni ann) = D1 (' MetaData "Type" "PlutusCore.Core.Type" "plutus-core-1.0.0.1-76bWF9ZEWyb4eDyjHx0kCS" ' 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) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

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

Defined in PlutusCore.Core.Type

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

typeSubtypes :: Traversal' ( Type tyname uni ann) ( Type tyname uni ann) Source #

Get all the direct child Type s of the given 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

Instances details
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 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 :: ( 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 #
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

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

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

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

Defined in PlutusIR.Core.Type

Methods

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

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

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

Defined in PlutusIR.Core.Instance.Scoping

( Show a, Show tyname, Show name, GShow uni) => Show ( Datatype tyname name uni fun a) Source #
Instance details

Defined in PlutusIR.Core.Type

Methods

showsPrec :: Int -> Datatype tyname name uni fun a -> ShowS Source #

show :: Datatype tyname name uni fun a -> String Source #

showList :: [ Datatype tyname name uni fun a] -> ShowS Source #

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

Defined in PlutusIR.Core.Type

Associated Types

type Rep ( Datatype tyname name uni fun a) :: Type -> Type Source #

Methods

from :: Datatype tyname name uni fun a -> Rep ( Datatype tyname name uni fun a) x Source #

to :: Rep ( Datatype tyname name uni fun a) x -> Datatype tyname name uni fun a Source #

( Closed uni, Everywhere uni Flat , Flat a, Flat tyname, Flat name, Flat fun) => Flat ( Datatype tyname name uni fun a) Source #
Instance details

Defined in PlutusIR.Core.Instance.Flat

Methods

encode :: Datatype tyname name uni fun a -> Encoding Source #

decode :: Get ( Datatype tyname name uni fun a) Source #

size :: Datatype tyname name uni fun a -> NumBits -> NumBits Source #

( PrettyClassic tyname, PrettyClassic name, GShow uni, Everywhere uni PrettyConst , Pretty ann) => Pretty ( Datatype tyname name uni fun ann) Source #
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

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

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

( Reference TyName t, Reference Name t) => Reference ( Datatype TyName Name uni fun ann) t Source #
Instance details

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 #
Instance details

Defined in PlutusIR.Core.Type

datatypeSubtypes :: Traversal' ( Datatype tyname name uni fun a) ( Type tyname uni a) Source #

Get all the direct child Type s of the given Datatype .

data Kind ann Source #

Constructors

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

Instances

Instances details
Functor Kind Source #
Instance details

Defined in PlutusCore.Core.Type

CollectScopeInfo Kind Source #
Instance details

Defined in PlutusCore.Core.Instance.Scoping

EstablishScoping Kind Source #
Instance details

Defined in PlutusCore.Core.Instance.Scoping

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Instance.Pretty.Plc

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

Generic ( Kind ann) Source #
Instance details

Defined in PlutusCore.Core.Type

Associated Types

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

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

Methods

rnf :: Kind ann -> () Source #

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

Defined in PlutusCore.Flat

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

Defined in PlutusCore.Core.Instance.Pretty.Default

Recursive ( Kind ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

project :: Kind ann -> Base ( Kind ann) ( Kind ann) Source #

cata :: ( Base ( Kind ann) a -> a) -> Kind ann -> a Source #

para :: ( Base ( Kind ann) ( Kind ann, a) -> a) -> Kind ann -> a Source #

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 Source #

prepro :: Corecursive ( Kind ann) => ( forall b. Base ( Kind ann) b -> Base ( Kind ann) b) -> ( Base ( Kind ann) a -> a) -> Kind ann -> a Source #

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 Source #

Corecursive ( Kind ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

embed :: Base ( Kind ann) ( Kind ann) -> Kind ann Source #

ana :: (a -> Base ( Kind ann) a) -> a -> Kind ann Source #

apo :: (a -> Base ( Kind ann) ( Either ( Kind ann) a)) -> a -> Kind ann Source #

postpro :: Recursive ( Kind ann) => ( forall b. Base ( Kind ann) b -> Base ( Kind ann) b) -> (a -> Base ( Kind ann) a) -> a -> Kind ann Source #

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 Source #

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

Defined in PlutusCore.Core.Instance.Pretty.Readable

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

Defined in PlutusCore.Core.Instance.Pretty.Classic

type Rep ( Kind ann) Source #
Instance details

Defined in PlutusCore.Core.Type

type Base ( Kind ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

type Base ( Kind ann) = KindF ann
type HasUniques ( Kind ann) Source #
Instance details

Defined in PlutusCore.Core.Type

type HasUniques ( Kind ann) = ()

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
Eq Recursivity Source #
Instance details

Defined in PlutusIR.Core.Type

Ord Recursivity Source #
Instance details

Defined in PlutusIR.Core.Type

Show Recursivity Source #
Instance details

Defined in PlutusIR.Core.Type

Generic Recursivity Source #
Instance details

Defined in PlutusIR.Core.Type

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

Flat Recursivity Source #
Instance details

Defined in PlutusIR.Core.Instance.Flat

PrettyBy ( PrettyConfigClassic configName) Recursivity Source #
Instance details

Defined in PlutusIR.Core.Instance.Pretty

type Rep Recursivity Source #
Instance details

Defined in PlutusIR.Core.Type

type Rep Recursivity = D1 (' MetaData "Recursivity" "PlutusIR.Core.Type" "plutus-core-1.0.0.1-76bWF9ZEWyb4eDyjHx0kCS" ' False ) ( C1 (' MetaCons "NonRec" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "Rec" ' PrefixI ' False ) ( U1 :: Type -> Type ))

data Strictness Source #

Instances

Instances details
Eq Strictness Source #
Instance details

Defined in PlutusIR.Core.Type

Show Strictness Source #
Instance details

Defined in PlutusIR.Core.Type

Generic Strictness Source #
Instance details

Defined in PlutusIR.Core.Type

Flat Strictness Source #
Instance details

Defined in PlutusIR.Core.Instance.Flat

PrettyBy ( PrettyConfigClassic configName) Strictness Source #
Instance details

Defined in PlutusIR.Core.Instance.Pretty

type Rep Strictness Source #
Instance details

Defined in PlutusIR.Core.Type

type Rep Strictness = D1 (' MetaData "Strictness" "PlutusIR.Core.Type" "plutus-core-1.0.0.1-76bWF9ZEWyb4eDyjHx0kCS" ' False ) ( C1 (' MetaCons "NonStrict" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "Strict" ' PrefixI ' False ) ( U1 :: Type -> Type ))

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

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

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 #

name ~ Name => Reference 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 :: ( forall name0. ToScopedName name0 => name0 -> NameAnn ) -> Name -> Binding tyname name uni fun NameAnn -> Binding tyname name uni fun NameAnn Source #

( PrettyClassicBy configName tyname, PrettyClassicBy configName name, GShow uni, Closed uni, Everywhere uni PrettyConst , Pretty fun, Pretty ann) => PrettyBy ( PrettyConfigClassic configName) ( Binding tyname name uni fun ann) Source #
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

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

prettyListBy :: PrettyConfigClassic 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

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

Defined in PlutusIR.Core.Type

Methods

showsPrec :: Int -> Binding tyname name uni fun a -> ShowS Source #

show :: Binding tyname name uni fun a -> String Source #

showList :: [ Binding tyname name uni fun a] -> ShowS 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) :: Type -> Type Source #

Methods

from :: Binding tyname name uni fun a -> Rep ( Binding tyname name uni fun a) x Source #

to :: Rep ( Binding tyname name uni fun a) x -> Binding tyname name uni fun a Source #

( Closed uni, Everywhere uni Flat , Flat fun, Flat a, Flat tyname, Flat name) => Flat ( Binding tyname name uni fun a) Source #
Instance details

Defined in PlutusIR.Core.Instance.Flat

Methods

encode :: Binding tyname name uni fun a -> Encoding Source #

decode :: Get ( Binding tyname name uni fun a) Source #

size :: Binding tyname name uni fun a -> NumBits -> NumBits Source #

( PrettyClassic tyname, PrettyClassic name, GShow uni, Closed uni, Everywhere uni PrettyConst , Pretty fun, Pretty ann) => Pretty ( Binding tyname name uni fun ann) Source #
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

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

prettyList :: [ Binding tyname name uni fun ann] -> Doc ann0 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 :: ( forall 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

bindingSubterms :: Traversal' ( Binding tyname name uni fun a) ( Term tyname name uni fun a) Source #

Get all the direct child Term s of the given Binding .

bindingSubtypes :: Traversal' ( Binding tyname name uni fun a) ( Type tyname uni a) Source #

Get all the direct child Type s of the given Binding .

bindingIds :: ( HasUnique tyname TypeUnique , HasUnique name TermUnique ) => Traversal1' ( Binding tyname name uni fun a) Unique Source #

All the identifiers/names introduced by this binding In case of a datatype-binding it has multiple identifiers: the type, constructors, match function

data Program tyname name uni fun ann Source #

Constructors

Program

Fields

Instances

Instances details
( 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 #
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

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

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

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

Defined in PlutusIR.Core.Instance.Scoping

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

Defined in PlutusIR.Core.Instance.Scoping

Methods

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

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

Defined in PlutusIR.Core.Type

Associated Types

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

Methods

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

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

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

Defined in PlutusIR.Core.Instance.Flat

Methods

encode :: Program tyname name uni fun a -> Encoding Source #

decode :: Get ( Program tyname name uni fun a) Source #

size :: Program tyname name uni fun a -> NumBits -> NumBits Source #

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

Defined in PlutusIR.Core.Instance.Pretty

Methods

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

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

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

Defined in PlutusIR.Transform.Rename

Methods

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

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.0.0.1-76bWF9ZEWyb4eDyjHx0kCS" ' 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 #
Instance details

Defined in PlutusIR.Core.Type

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

applyProgram :: Monoid a => Program tyname name uni fun a -> Program tyname name uni fun a -> Program tyname name uni fun a Source #

newtype TyName Source #

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

Constructors

TyName

Instances

Instances details
Eq TyName Source #
Instance details

Defined in PlutusCore.Name

Ord TyName Source #
Instance details

Defined in PlutusCore.Name

Show TyName Source #
Instance details

Defined in PlutusCore.Name

Generic TyName Source #
Instance details

Defined in PlutusCore.Name

Hashable TyName Source #
Instance details

Defined in PlutusCore.Name

NFData TyName Source #
Instance details

Defined in PlutusCore.Name

Flat TyName Source #
Instance details

Defined in PlutusCore.Flat

Wrapped TyName Source #
Instance details

Defined in PlutusCore.Name

ToScopedName TyName Source #
Instance details

Defined in PlutusCore.Check.Scoping

Lift TyName Source #
Instance details

Defined in PlutusCore.Name

HasPrettyConfigName config => PrettyBy config TyName Source #
Instance details

Defined in PlutusCore.Name

HasUnique TyName TypeUnique Source #
Instance details

Defined in PlutusCore.Name

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

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 #
Instance details

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 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 :: ( 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 #
Instance details

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

Defined in PlutusCore.Flat

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

Defined in PlutusCore.Core.Instance.Eq

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

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 #
Instance details

Defined in PlutusCore.Error

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

Defined in PlutusIR.Error

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

Defined in PlutusCore.Core.Instance.Eq

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

Defined in PlutusCore.Builtin.HasConstant

( 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 :: ( 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 #
Instance details

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 #
Instance details

Defined in PlutusCore.Name

type Rep TyName = D1 (' MetaData "TyName" "PlutusCore.Name" "plutus-core-1.0.0.1-76bWF9ZEWyb4eDyjHx0kCS" ' True ) ( C1 (' MetaCons "TyName" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unTyName") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name )))
type Unwrapped TyName Source #
Instance details

Defined in PlutusCore.Name

data Name Source #

A Name represents variables/names in Plutus Core.

Constructors

Name

Fields

Instances

Instances details
Eq Name Source #
Instance details

Defined in PlutusCore.Name

Ord Name Source #
Instance details

Defined in PlutusCore.Name

Show Name Source #
Instance details

Defined in PlutusCore.Name

Generic Name Source #
Instance details

Defined in PlutusCore.Name

Associated Types

type Rep Name :: Type -> Type Source #

Hashable Name Source #
Instance details

Defined in PlutusCore.Name

NFData Name Source #
Instance details

Defined in PlutusCore.Name

Flat Name Source #
Instance details

Defined in PlutusCore.Flat

ToScopedName Name Source #
Instance details

Defined in PlutusCore.Check.Scoping

Lift Name Source #
Instance details

Defined in PlutusCore.Name

HasPrettyConfigName config => PrettyBy config Name Source #
Instance details

Defined in PlutusCore.Name

HasUnique Name TermUnique Source #
Instance details

Defined in PlutusCore.Name

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

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 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 :: ( forall name0. ToScopedName name0 => name0 -> NameAnn ) -> Name -> Binding tyname name uni fun NameAnn -> Binding tyname name uni fun NameAnn Source #

Flat ( Binder Name ) Source #
Instance details

Defined in PlutusCore.Flat

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

Defined in PlutusCore.Error

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

Defined in PlutusIR.Error

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

Defined in UntypedPlutusCore.Core.Instance.Eq

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

Defined in PlutusCore.Core.Instance.Eq

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

Defined in PlutusCore.Builtin.HasConstant

( 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 :: ( 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 #
Instance details

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 #
Instance details

Defined in PlutusCore.Name

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

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

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 #
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

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

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

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

Defined in PlutusIR.Core.Instance.Scoping

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

Defined in PlutusCore.Core.Type

Methods

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

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

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

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

Defined in PlutusCore.Core.Type

Associated Types

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

Methods

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

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

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

Defined in PlutusCore.Flat

Methods

encode :: VarDecl tyname name uni fun ann -> Encoding Source #

decode :: Get ( VarDecl tyname name uni fun ann) Source #

size :: VarDecl tyname name uni fun ann -> NumBits -> NumBits Source #

( PrettyClassic tyname, PrettyClassic name, GShow uni, Everywhere uni PrettyConst , Pretty ann) => Pretty ( VarDecl tyname name uni fun ann) Source #
Instance details

Defined in PlutusIR.Core.Instance.Pretty

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

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

Reference name t => Reference ( VarDecl tyname name uni fun ann) t Source #
Instance details

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 #
Instance details

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-76bWF9ZEWyb4eDyjHx0kCS" ' 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.

Instances

Instances details
Functor ( TyVarDecl tyname) Source #
Instance details

Defined in PlutusCore.Core.Type

Methods

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

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

tyname ~ TyName => CollectScopeInfo ( 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

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

Defined in PlutusCore.Core.Type

Generic ( TyVarDecl tyname ann) Source #
Instance details

Defined in PlutusCore.Core.Type

Associated Types

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

Methods

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

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

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

Defined in PlutusCore.Flat

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

Defined in PlutusIR.Core.Instance.Pretty

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

Defined in PlutusCore.Core.Type

Reference tyname t => Reference ( TyVarDecl tyname ann) t Source #
Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia :: ( forall name. ToScopedName name => name -> NameAnn ) -> TyVarDecl tyname ann -> t NameAnn -> t NameAnn Source #

type Rep ( TyVarDecl tyname ann) Source #
Instance details

Defined in PlutusCore.Core.Type

type Rep ( TyVarDecl tyname ann) = D1 (' MetaData "TyVarDecl" "PlutusCore.Core.Type" "plutus-core-1.0.0.1-76bWF9ZEWyb4eDyjHx0kCS" ' 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)))))