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

PlutusCore.Core

Synopsis

Documentation

data Kind ann Source #

Constructors

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

Instances

Instances details
Functor Kind Source #
Instance details

Defined in PlutusCore.Core.Type

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

data Term tyname name uni fun ann Source #

Constructors

Var ann name

a named variable

TyAbs ann tyname ( Kind ann) ( Term tyname name uni fun ann)
LamAbs ann name ( Type tyname uni ann) ( Term tyname name uni fun ann)
Apply ann ( Term tyname name uni fun ann) ( Term tyname name uni fun ann)
Constant ann ( Some ( ValueOf uni))

a constant term

Builtin ann fun
TyInst ann ( Term tyname name uni fun ann) ( Type tyname uni ann)
Unwrap ann ( Term tyname name uni fun ann)
IWrap ann ( Type tyname uni ann) ( Type tyname uni ann) ( Term tyname name uni fun ann)
Error ann ( Type tyname uni ann)

Instances

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

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 #

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

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

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

prettyListBy :: PrettyConfigReadable configName -> [ Term tyname name uni fun a] -> Doc ann 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 PlutusCore.Core.Instance.Pretty.Classic

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 ann) ( Term TyName Name uni fun ()) uni fun ann Source #
Instance details

Defined in PlutusCore.Error

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

Defined in PlutusCore.Core.Type

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Scoping

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusCore.MkPlc

Methods

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

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

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

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

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

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

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

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

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

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

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 #

( 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

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

Defined in PlutusCore.Core.Instance.Eq

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

Defined in PlutusCore.Core.Instance.Eq

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

Defined in PlutusCore.Core.Type

Methods

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

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

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

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

Defined in PlutusCore.Core.Type

Associated Types

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

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

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

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

Defined in PlutusCore.Flat

Methods

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

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

size :: Term tyname name uni fun ann -> 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 PlutusCore.Core.Instance.Pretty.Default

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Recursive

Methods

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

cata :: ( Base ( Term tyname name uni fun ann) a -> a) -> Term tyname name uni fun ann -> a Source #

para :: ( Base ( Term tyname name uni fun ann) ( Term tyname name uni fun ann, a) -> a) -> Term tyname name uni fun ann -> a Source #

gpara :: ( Corecursive ( Term tyname name uni fun ann), Comonad w) => ( forall b. Base ( Term tyname name uni fun ann) (w b) -> w ( Base ( Term tyname name uni fun ann) b)) -> ( Base ( Term tyname name uni fun ann) ( EnvT ( Term tyname name uni fun ann) w a) -> a) -> Term tyname name uni fun ann -> a Source #

prepro :: Corecursive ( Term tyname name uni fun ann) => ( forall b. Base ( Term tyname name uni fun ann) b -> Base ( Term tyname name uni fun ann) b) -> ( Base ( Term tyname name uni fun ann) a -> a) -> Term tyname name uni fun ann -> a Source #

gprepro :: ( Corecursive ( Term tyname name uni fun ann), Comonad w) => ( forall b. Base ( Term tyname name uni fun ann) (w b) -> w ( Base ( Term tyname name uni fun ann) b)) -> ( forall c. Base ( Term tyname name uni fun ann) c -> Base ( Term tyname name uni fun ann) c) -> ( Base ( Term tyname name uni fun ann) (w a) -> a) -> Term tyname name uni fun ann -> a Source #

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

Defined in PlutusCore.Core.Instance.Recursive

Methods

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

ana :: (a -> Base ( Term tyname name uni fun ann) a) -> a -> Term tyname name uni fun ann Source #

apo :: (a -> Base ( Term tyname name uni fun ann) ( Either ( Term tyname name uni fun ann) a)) -> a -> Term tyname name uni fun ann Source #

postpro :: Recursive ( Term tyname name uni fun ann) => ( forall b. Base ( Term tyname name uni fun ann) b -> Base ( Term tyname name uni fun ann) b) -> (a -> Base ( Term tyname name uni fun ann) a) -> a -> Term tyname name uni fun ann Source #

gpostpro :: ( Recursive ( Term tyname name uni fun ann), Monad m) => ( forall b. m ( Base ( Term tyname name uni fun ann) b) -> Base ( Term tyname name uni fun ann) (m b)) -> ( forall c. Base ( Term tyname name uni fun ann) c -> Base ( Term tyname name uni fun ann) c) -> (a -> Base ( Term tyname name uni fun ann) (m a)) -> a -> Term tyname name uni fun ann Source #

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

Defined in PlutusCore.Rename

Methods

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

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

Defined in PlutusCore.Builtin.HasConstant

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Instance.Recursive

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

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

data Version ann Source #

Version of Plutus Core to be used for the program.

Instances

Instances details
Functor Version Source #
Instance details

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

Generic ( Version ann) Source #
Instance details

Defined in PlutusCore.Core.Type

Associated Types

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

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

Methods

rnf :: Version ann -> () Source #

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

Defined in PlutusCore.Flat

Pretty ( Version ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Common

type Rep ( Version ann) Source #
Instance details

Defined in PlutusCore.Core.Type

data Program tyname name uni fun ann Source #

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

Constructors

Program

Fields

Instances

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

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Scoping

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusCore.Core.Instance.Eq

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

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

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

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

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

Defined in PlutusCore.Core.Type

Associated Types

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

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

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

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

Defined in PlutusCore.Flat

Methods

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

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

size :: Program tyname name uni fun ann -> 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 PlutusCore.Core.Instance.Pretty.Default

Methods

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

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

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

Defined in PlutusCore.Rename

Methods

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

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

Defined in PlutusCore.Core.Type

type Rep ( Program tyname name uni fun ann) = D1 (' MetaData "Program" "PlutusCore.Core.Type" "plutus-core-1.0.0.1-76bWF9ZEWyb4eDyjHx0kCS" ' False ) ( C1 (' MetaCons "Program" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "_progAnn") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ann) :*: ( S1 (' MetaSel (' Just "_progVer") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Version 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 PlutusCore.Core.Type

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

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

Extract the universe from a type.

Instances

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

Defined in PlutusCore.Builtin.Polymorphism

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

Defined in PlutusCore.Evaluation.Machine.Ck

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

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

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

Defined in UntypedPlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

type UniOf ( Term tyname name uni fun ann) = uni
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

newtype Normalized a Source #

Constructors

Normalized

Fields

Instances

Instances details
Functor Normalized Source #
Instance details

Defined in PlutusCore.Core.Type

Applicative Normalized Source #
Instance details

Defined in PlutusCore.Core.Type

Foldable Normalized Source #
Instance details

Defined in PlutusCore.Core.Type

Traversable Normalized Source #
Instance details

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

Generic ( Normalized a) Source #
Instance details

Defined in PlutusCore.Core.Type

Associated Types

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

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Flat

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Rename

type Rep ( Normalized a) Source #
Instance details

Defined in PlutusCore.Core.Type

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

data TyVarDecl tyname ann Source #

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

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)))))

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 TyDecl tyname uni ann Source #

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

Constructors

TyDecl

Fields

Instances

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

Defined in PlutusCore.Core.Type

Methods

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

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

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

Defined in PlutusCore.Core.Type

Generic ( TyDecl tyname uni ann) Source #
Instance details

Defined in PlutusCore.Core.Type

Associated Types

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

Methods

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

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

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

Defined in PlutusCore.Core.Type

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

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

type family HasUniques a :: Constraint Source #

All kinds of uniques an entity contains.

Instances

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

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

Defined in UntypedPlutusCore.Core.Type

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

Defined in UntypedPlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

type HasUniques ( Term tyname name uni fun ann) = ( HasUnique tyname TypeUnique , HasUnique name TermUnique )
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)
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 )

newtype Binder name Source #

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

Constructors

Binder

Fields

defaultVersion :: ann -> Version ann Source #

The default version of Plutus Core supported by this library.

Helper functions

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

tyVarDeclSubkinds :: Traversal' ( TyVarDecl tyname a) ( Kind a) Source #

Get all the direct child Kind s of the given TyVarDecl .

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

Get all the direct child 'tyname a's of the given Type from binders.

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

Get all the direct child 'tyname a's of the given Type from TyVar s.

typeUniques :: HasUniques ( Type tyname uni ann) => Traversal' ( Type tyname uni ann) Unique Source #

Get all the direct child Unique s of the given Type from binders TyVar s.

typeSubkinds :: Traversal' ( Type tyname uni ann) ( Kind ann) Source #

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

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

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

typeSubtypesDeep :: Fold ( Type tyname uni ann) ( Type tyname uni ann) Source #

Get all the transitive child Type s of the given Type .

varDeclSubtypes :: Traversal' ( VarDecl tyname name uni fun a) ( Type tyname uni a) Source #

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

termTyBinds :: Traversal' ( Term tyname name uni fun ann) tyname Source #

Get all the direct child 'tyname a's of the given Term from TyAbs es.

termBinds :: Traversal' ( Term tyname name uni fun ann) name Source #

Get all the direct child 'name a's of the given Term from LamAbs es.

termVars :: Traversal' ( Term tyname name uni fun ann) name Source #

Get all the direct child 'name a's of the given Term from Var s.

termUniques :: HasUniques ( Term tyname name uni fun ann) => Traversal' ( Term tyname name uni fun ann) Unique Source #

Get all the direct child Unique s of the given Term (including the type-level ones).

termSubkinds :: Traversal' ( Term tyname name uni fun ann) ( Kind ann) Source #

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

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

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

termSubtypesDeep :: Fold ( Term tyname name uni fun ann) ( Type tyname uni ann) Source #

Get all the transitive child Type s of the given Term .

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

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

termSubtermsDeep :: Fold ( Term tyname name uni fun ann) ( Term tyname name uni fun ann) Source #

Get all the transitive child Term s of the given Term .

typeUniquesDeep :: HasUniques ( Type tyname uni ann) => Fold ( Type tyname uni ann) Unique Source #

Get all the transitive child Unique s of the given Type .

termUniquesDeep :: HasUniques ( Term tyname name uni fun ann) => Fold ( Term tyname name uni fun ann) Unique Source #

Get all the transitive child Unique s of the given Term (including the type-level ones).

Base functors

data TermF (tyname :: Type ) (name :: Type ) (uni :: Type -> Type ) (fun :: Type ) (ann :: Type ) r Source #

Constructors

VarF ann name
TyAbsF ann tyname ( Kind ann) r
LamAbsF ann name ( Type tyname uni ann) r
ApplyF ann r r
ConstantF ann ( Some ( ValueOf uni))
BuiltinF ann fun
TyInstF ann r ( Type tyname uni ann)
UnwrapF ann r
IWrapF ann ( Type tyname uni ann) ( Type tyname uni ann) r
ErrorF ann ( Type tyname uni ann)

Instances

Instances details
Functor ( TermF tyname name uni fun ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

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

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

Foldable ( TermF tyname name uni fun ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

fold :: Monoid m => TermF tyname name uni fun ann m -> m Source #

foldMap :: Monoid m => (a -> m) -> TermF tyname name uni fun ann a -> m Source #

foldMap' :: Monoid m => (a -> m) -> TermF tyname name uni fun ann a -> m Source #

foldr :: (a -> b -> b) -> b -> TermF tyname name uni fun ann a -> b Source #

foldr' :: (a -> b -> b) -> b -> TermF tyname name uni fun ann a -> b Source #

foldl :: (b -> a -> b) -> b -> TermF tyname name uni fun ann a -> b Source #

foldl' :: (b -> a -> b) -> b -> TermF tyname name uni fun ann a -> b Source #

foldr1 :: (a -> a -> a) -> TermF tyname name uni fun ann a -> a Source #

foldl1 :: (a -> a -> a) -> TermF tyname name uni fun ann a -> a Source #

toList :: TermF tyname name uni fun ann a -> [a] Source #

null :: TermF tyname name uni fun ann a -> Bool Source #

length :: TermF tyname name uni fun ann a -> Int Source #

elem :: Eq a => a -> TermF tyname name uni fun ann a -> Bool Source #

maximum :: Ord a => TermF tyname name uni fun ann a -> a Source #

minimum :: Ord a => TermF tyname name uni fun ann a -> a Source #

sum :: Num a => TermF tyname name uni fun ann a -> a Source #

product :: Num a => TermF tyname name uni fun ann a -> a Source #

Traversable ( TermF tyname name uni fun ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

traverse :: Applicative f => (a -> f b) -> TermF tyname name uni fun ann a -> f ( TermF tyname name uni fun ann b) Source #

sequenceA :: Applicative f => TermF tyname name uni fun ann (f a) -> f ( TermF tyname name uni fun ann a) Source #

mapM :: Monad m => (a -> m b) -> TermF tyname name uni fun ann a -> m ( TermF tyname name uni fun ann b) Source #

sequence :: Monad m => TermF tyname name uni fun ann (m a) -> m ( TermF tyname name uni fun ann a) Source #

data TypeF (tyname :: Type ) (uni :: Type -> Type ) (ann :: Type ) r Source #

Constructors

TyVarF ann tyname
TyFunF ann r r
TyIFixF ann r r
TyForallF ann tyname ( Kind ann) r
TyBuiltinF ann ( SomeTypeIn uni)
TyLamF ann tyname ( Kind ann) r
TyAppF ann r r

Instances

Instances details
Functor ( TypeF tyname uni ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

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

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

Foldable ( TypeF tyname uni ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

fold :: Monoid m => TypeF tyname uni ann m -> m Source #

foldMap :: Monoid m => (a -> m) -> TypeF tyname uni ann a -> m Source #

foldMap' :: Monoid m => (a -> m) -> TypeF tyname uni ann a -> m Source #

foldr :: (a -> b -> b) -> b -> TypeF tyname uni ann a -> b Source #

foldr' :: (a -> b -> b) -> b -> TypeF tyname uni ann a -> b Source #

foldl :: (b -> a -> b) -> b -> TypeF tyname uni ann a -> b Source #

foldl' :: (b -> a -> b) -> b -> TypeF tyname uni ann a -> b Source #

foldr1 :: (a -> a -> a) -> TypeF tyname uni ann a -> a Source #

foldl1 :: (a -> a -> a) -> TypeF tyname uni ann a -> a Source #

toList :: TypeF tyname uni ann a -> [a] Source #

null :: TypeF tyname uni ann a -> Bool Source #

length :: TypeF tyname uni ann a -> Int Source #

elem :: Eq a => a -> TypeF tyname uni ann a -> Bool Source #

maximum :: Ord a => TypeF tyname uni ann a -> a Source #

minimum :: Ord a => TypeF tyname uni ann a -> a Source #

sum :: Num a => TypeF tyname uni ann a -> a Source #

product :: Num a => TypeF tyname uni ann a -> a Source #

Traversable ( TypeF tyname uni ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

traverse :: Applicative f => (a -> f b) -> TypeF tyname uni ann a -> f ( TypeF tyname uni ann b) Source #

sequenceA :: Applicative f => TypeF tyname uni ann (f a) -> f ( TypeF tyname uni ann a) Source #

mapM :: Monad m => (a -> m b) -> TypeF tyname uni ann a -> m ( TypeF tyname uni ann b) Source #

sequence :: Monad m => TypeF tyname uni ann (m a) -> m ( TypeF tyname uni ann a) Source #

data KindF (ann :: Type ) r Source #

Constructors

TypeF ann
KindArrowF ann r r

Instances

Instances details
Functor ( KindF ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

fmap :: (a -> b) -> KindF ann a -> KindF ann b Source #

(<$) :: a -> KindF ann b -> KindF ann a Source #

Foldable ( KindF ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

fold :: Monoid m => KindF ann m -> m Source #

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

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

foldr :: (a -> b -> b) -> b -> KindF ann a -> b Source #

foldr' :: (a -> b -> b) -> b -> KindF ann a -> b Source #

foldl :: (b -> a -> b) -> b -> KindF ann a -> b Source #

foldl' :: (b -> a -> b) -> b -> KindF ann a -> b Source #

foldr1 :: (a -> a -> a) -> KindF ann a -> a Source #

foldl1 :: (a -> a -> a) -> KindF ann a -> a Source #

toList :: KindF ann a -> [a] Source #

null :: KindF ann a -> Bool Source #

length :: KindF ann a -> Int Source #

elem :: Eq a => a -> KindF ann a -> Bool Source #

maximum :: Ord a => KindF ann a -> a Source #

minimum :: Ord a => KindF ann a -> a Source #

sum :: Num a => KindF ann a -> a Source #

product :: Num a => KindF ann a -> a Source #

Traversable ( KindF ann) Source #
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

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

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

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

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