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

PlutusCore

Synopsis

Parser

parseProgram ∷ (AsParserErrorBundle e, MonadError e m, MonadQuote m) ⇒ Text → m (Program TyName Name DefaultUni DefaultFun SrcSpan) Source #

Parse a PLC program. The resulting program will have fresh names. The underlying monad must be capable of handling any parse errors. This passes "test" to the parser as the name of the input stream; to supply a name explicity, use `parse program name input`.

parseTerm ∷ (AsParserErrorBundle e, MonadError e m, MonadQuote m) ⇒ Text → m (Term TyName Name DefaultUni DefaultFun SrcSpan) Source #

Parse a PLC term. The resulting program will have fresh names. The underlying monad must be capable of handling any parse errors.

parseType ∷ (AsParserErrorBundle e, MonadError e m, MonadQuote m) ⇒ Text → m (Type TyName DefaultUni SrcSpan) Source #

Parse a PLC type. The resulting program will have fresh names. The underlying monad must be capable of handling any parse errors.

data SourcePos Source #

The data type SourcePos represents source positions. It contains the name of the source file, a line number, and a column number. Source line and column positions change intensively during parsing, so we need to make them strict to avoid memory leaks.

Instances

Instances details
Data SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Methods

gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → SourcePos → c SourcePos Source #

gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c SourcePos Source #

toConstrSourcePosConstr Source #

dataTypeOfSourcePosDataType Source #

dataCast1Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c SourcePos) Source #

dataCast2Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c SourcePos) Source #

gmapT ∷ (∀ b. Data b ⇒ b → b) → SourcePosSourcePos Source #

gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → SourcePos → r Source #

gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → SourcePos → r Source #

gmapQ ∷ (∀ d. Data d ⇒ d → u) → SourcePos → [u] Source #

gmapQiInt → (∀ d. Data d ⇒ d → u) → SourcePos → u Source #

gmapMMonad m ⇒ (∀ d. Data d ⇒ d → m d) → SourcePos → m SourcePos Source #

gmapMpMonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → SourcePos → m SourcePos Source #

gmapMoMonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → SourcePos → m SourcePos Source #

Generic SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Associated Types

type Rep SourcePosTypeType Source #

Read SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Show SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

NFData SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Methods

rnfSourcePos → () Source #

Eq SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Ord SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

Pretty SourcePos Source # 
Instance details

Defined in PlutusCore.Error

Methods

prettySourcePosDoc ann Source #

prettyList ∷ [SourcePos] → Doc ann Source #

type Rep SourcePos 
Instance details

Defined in Text.Megaparsec.Pos

type Rep SourcePos = D1 ('MetaData "SourcePos" "Text.Megaparsec.Pos" "megaparsec-9.6.1-2lyGI2Uoag79kpXJQceOQM" 'False) (C1 ('MetaCons "SourcePos" 'PrefixI 'True) (S1 ('MetaSel ('Just "sourceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: (S1 ('MetaSel ('Just "sourceLine") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Pos) :*: S1 ('MetaSel ('Just "sourceColumn") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Pos))))

data SrcSpan Source #

The span between two source locations.

This corresponds roughly to the SrcSpan used by GHC, but we define our own version so we don't have to depend on ghc to use it.

The line and column numbers are 1-based, and the unit is Unicode code point (or Char).

Constructors

SrcSpan 

Fields

Instances

Instances details
Generic SrcSpan Source # 
Instance details

Defined in PlutusCore.Annotation

Associated Types

type Rep SrcSpanTypeType Source #

Methods

fromSrcSpanRep SrcSpan x Source #

toRep SrcSpan x → SrcSpan Source #

Show SrcSpan Source # 
Instance details

Defined in PlutusCore.Annotation

NFData SrcSpan Source # 
Instance details

Defined in PlutusCore.Annotation

Methods

rnfSrcSpan → () Source #

Flat SrcSpan Source # 
Instance details

Defined in PlutusCore.Annotation

Eq SrcSpan Source # 
Instance details

Defined in PlutusCore.Annotation

Methods

(==)SrcSpanSrcSpanBool Source #

(/=)SrcSpanSrcSpanBool Source #

Ord SrcSpan Source # 
Instance details

Defined in PlutusCore.Annotation

Hashable SrcSpan Source # 
Instance details

Defined in PlutusCore.Annotation

Methods

hashWithSaltIntSrcSpanInt Source #

hashSrcSpanInt Source #

Pretty SrcSpan Source # 
Instance details

Defined in PlutusCore.Annotation

Methods

prettySrcSpanDoc ann Source #

prettyList ∷ [SrcSpan] → Doc ann Source #

Exception (UniqueError SrcSpan) Source # 
Instance details

Defined in PlutusCore.Error

type Rep SrcSpan Source # 
Instance details

Defined in PlutusCore.Annotation

type Rep SrcSpan = D1 ('MetaData "SrcSpan" "PlutusCore.Annotation" "plutus-core-1.34.0.0-inplace" 'False) (C1 ('MetaCons "SrcSpan" 'PrefixI 'True) ((S1 ('MetaSel ('Just "srcSpanFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "srcSpanSLine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "srcSpanSCol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "srcSpanELine") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "srcSpanECol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))))

data SrcSpans Source #

Instances

Instances details
Monoid SrcSpans Source # 
Instance details

Defined in PlutusCore.Annotation

Semigroup SrcSpans Source # 
Instance details

Defined in PlutusCore.Annotation

Generic SrcSpans Source # 
Instance details

Defined in PlutusCore.Annotation

Associated Types

type Rep SrcSpansTypeType Source #

Show SrcSpans Source # 
Instance details

Defined in PlutusCore.Annotation

NFData SrcSpans Source # 
Instance details

Defined in PlutusCore.Annotation

Methods

rnfSrcSpans → () Source #

Flat SrcSpans Source # 
Instance details

Defined in PlutusCore.Annotation

Eq SrcSpans Source # 
Instance details

Defined in PlutusCore.Annotation

Ord SrcSpans Source # 
Instance details

Defined in PlutusCore.Annotation

Hashable SrcSpans Source # 
Instance details

Defined in PlutusCore.Annotation

MonoFoldable SrcSpans Source # 
Instance details

Defined in PlutusCore.Annotation

Methods

ofoldMapMonoid m ⇒ (Element SrcSpans → m) → SrcSpans → m Source #

ofoldr ∷ (Element SrcSpans → b → b) → b → SrcSpans → b Source #

ofoldl' ∷ (a → Element SrcSpans → a) → a → SrcSpans → a Source #

otoListSrcSpans → [Element SrcSpans] Source #

oall ∷ (Element SrcSpansBool) → SrcSpansBool Source #

oany ∷ (Element SrcSpansBool) → SrcSpansBool Source #

onullSrcSpansBool Source #

olengthSrcSpansInt Source #

olength64SrcSpansInt64 Source #

ocompareLengthIntegral i ⇒ SrcSpans → i → Ordering Source #

otraverse_Applicative f ⇒ (Element SrcSpans → f b) → SrcSpans → f () Source #

ofor_Applicative f ⇒ SrcSpans → (Element SrcSpans → f b) → f () Source #

omapM_Applicative m ⇒ (Element SrcSpans → m ()) → SrcSpans → m () Source #

oforM_Applicative m ⇒ SrcSpans → (Element SrcSpans → m ()) → m () Source #

ofoldlMMonad m ⇒ (a → Element SrcSpans → m a) → a → SrcSpans → m a Source #

ofoldMap1ExSemigroup m ⇒ (Element SrcSpans → m) → SrcSpans → m Source #

ofoldr1Ex ∷ (Element SrcSpansElement SrcSpansElement SrcSpans) → SrcSpansElement SrcSpans Source #

ofoldl1Ex' ∷ (Element SrcSpansElement SrcSpansElement SrcSpans) → SrcSpansElement SrcSpans Source #

headExSrcSpansElement SrcSpans Source #

lastExSrcSpansElement SrcSpans Source #

unsafeHeadSrcSpansElement SrcSpans Source #

unsafeLastSrcSpansElement SrcSpans Source #

maximumByEx ∷ (Element SrcSpansElement SrcSpansOrdering) → SrcSpansElement SrcSpans Source #

minimumByEx ∷ (Element SrcSpansElement SrcSpansOrdering) → SrcSpansElement SrcSpans Source #

oelemElement SrcSpansSrcSpansBool Source #

onotElemElement SrcSpansSrcSpansBool Source #

Pretty SrcSpans Source # 
Instance details

Defined in PlutusCore.Annotation

Methods

prettySrcSpansDoc ann Source #

prettyList ∷ [SrcSpans] → Doc ann Source #

type Rep SrcSpans Source # 
Instance details

Defined in PlutusCore.Annotation

type Rep SrcSpans = D1 ('MetaData "SrcSpans" "PlutusCore.Annotation" "plutus-core-1.34.0.0-inplace" 'True) (C1 ('MetaCons "SrcSpans" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSrcSpans") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set SrcSpan))))
type Element SrcSpans Source # 
Instance details

Defined in PlutusCore.Annotation

Builtins

data Some (tag ∷ k → Type) where Source #

Existential. This is type is useful to hide GADTs' parameters.

>>> data Tag :: Type -> Type where TagInt :: Tag Int; TagBool :: Tag Bool
>>> instance GShow Tag where gshowsPrec _ TagInt = showString "TagInt"; gshowsPrec _ TagBool = showString "TagBool"
>>> classify s = case s of "TagInt" -> [mkGReadResult TagInt]; "TagBool" -> [mkGReadResult TagBool]; _ -> []
>>> instance GRead Tag where greadsPrec _ s = [ (r, rest) | (con, rest) <-  lex s, r <- classify con ]

You can either use PatternSynonyms (available with GHC >= 8.0)

>>> let x = Some TagInt
>>> x
Some TagInt
>>> case x of { Some TagInt -> "I"; Some TagBool -> "B" } :: String
"I"

or you can use functions

>>> let y = mkSome TagBool
>>> y
Some TagBool
>>> withSome y $ \y' -> case y' of { TagInt -> "I"; TagBool -> "B" } :: String
"B"

The implementation of mapSome is safe.

>>> let f :: Tag a -> Tag a; f TagInt = TagInt; f TagBool = TagBool
>>> mapSome f y
Some TagBool

but you can also use:

>>> withSome y (mkSome . f)
Some TagBool
>>> read "Some TagBool" :: Some Tag
Some TagBool
>>> read "mkSome TagInt" :: Some Tag
Some TagInt

Bundled Patterns

pattern Some ∷ ∀ {k} tag (a ∷ k). () ⇒ tag a → Some tag 

Instances

Instances details
(Closed uni, Everywhere uni PrettyConst) ⇒ PrettyBy ConstConfig (Some (ValueOf uni)) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyByConstConfigSome (ValueOf uni) → Doc ann Source #

prettyListByConstConfig → [Some (ValueOf uni)] → Doc ann Source #

Applicative m ⇒ Monoid (Some m) 
Instance details

Defined in Data.Some.Newtype

Methods

memptySome m Source #

mappendSome m → Some m → Some m Source #

mconcat ∷ [Some m] → Some m Source #

Applicative m ⇒ Semigroup (Some m) 
Instance details

Defined in Data.Some.Newtype

Methods

(<>)Some m → Some m → Some m Source #

sconcatNonEmpty (Some m) → Some m Source #

stimesIntegral b ⇒ b → Some m → Some m Source #

GRead f ⇒ Read (Some f) 
Instance details

Defined in Data.Some.Newtype

GShow tag ⇒ Show (Some tag) 
Instance details

Defined in Data.Some.Newtype

Methods

showsPrecIntSome tag → ShowS Source #

showSome tag → String Source #

showList ∷ [Some tag] → ShowS Source #

GNFData tag ⇒ NFData (Some tag) 
Instance details

Defined in Data.Some.Newtype

Methods

rnfSome tag → () Source #

(Closed uni, Everywhere uni Flat) ⇒ Flat (Some (ValueOf uni)) Source # 
Instance details

Defined in PlutusCore.Flat

Methods

encodeSome (ValueOf uni) → Encoding Source #

decodeGet (Some (ValueOf uni)) Source #

sizeSome (ValueOf uni) → NumBitsNumBits Source #

GEq tag ⇒ Eq (Some tag) 
Instance details

Defined in Data.Some.Newtype

Methods

(==)Some tag → Some tag → Bool Source #

(/=)Some tag → Some tag → Bool Source #

GCompare tag ⇒ Ord (Some tag) 
Instance details

Defined in Data.Some.Newtype

Methods

compareSome tag → Some tag → Ordering Source #

(<)Some tag → Some tag → Bool Source #

(<=)Some tag → Some tag → Bool Source #

(>)Some tag → Some tag → Bool Source #

(>=)Some tag → Some tag → Bool Source #

maxSome tag → Some tag → Some tag Source #

minSome tag → Some tag → Some tag Source #

(Closed uni, GEq uni, Everywhere uni Eq, Everywhere uni Hashable) ⇒ Hashable (Some (ValueOf uni)) Source # 
Instance details

Defined in Universe.Core

Methods

hashWithSaltIntSome (ValueOf uni) → Int Source #

hashSome (ValueOf uni) → Int Source #

(Closed uni, Everywhere uni ExMemoryUsage) ⇒ ExMemoryUsage (Some (ValueOf uni)) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemoryUsage

Methods

memoryUsageSome (ValueOf uni) → CostRose Source #

(Closed uni, Everywhere uni PrettyConst) ⇒ Pretty (Some (ValueOf uni)) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettySome (ValueOf uni) → Doc ann Source #

prettyList ∷ [Some (ValueOf uni)] → Doc ann Source #

data SomeTypeIn uni Source #

A particular type from a universe.

Constructors

∀ k (a ∷ k). SomeTypeIn !(uni (Esc a)) 

Instances

Instances details
PrettyBy RenderContext (SomeTypeIn DefaultUni) Source # 
Instance details

Defined in PlutusCore.Default.Universe

GShow uni ⇒ Show (SomeTypeIn uni) Source # 
Instance details

Defined in Universe.Core

Methods

showsPrecIntSomeTypeIn uni → ShowS Source #

showSomeTypeIn uni → String Source #

showList ∷ [SomeTypeIn uni] → ShowS Source #

Closed uni ⇒ NFData (SomeTypeIn uni) Source # 
Instance details

Defined in Universe.Core

Methods

rnfSomeTypeIn uni → () Source #

Closed uni ⇒ Flat (SomeTypeIn uni) Source # 
Instance details

Defined in PlutusCore.Flat

GEq uni ⇒ Eq (SomeTypeIn uni) Source # 
Instance details

Defined in Universe.Core

Methods

(==)SomeTypeIn uni → SomeTypeIn uni → Bool Source #

(/=)SomeTypeIn uni → SomeTypeIn uni → Bool Source #

GCompare uni ⇒ Ord (SomeTypeIn uni) Source # 
Instance details

Defined in Universe.Core

Methods

compareSomeTypeIn uni → SomeTypeIn uni → Ordering Source #

(<)SomeTypeIn uni → SomeTypeIn uni → Bool Source #

(<=)SomeTypeIn uni → SomeTypeIn uni → Bool Source #

(>)SomeTypeIn uni → SomeTypeIn uni → Bool Source #

(>=)SomeTypeIn uni → SomeTypeIn uni → Bool Source #

maxSomeTypeIn uni → SomeTypeIn uni → SomeTypeIn uni Source #

minSomeTypeIn uni → SomeTypeIn uni → SomeTypeIn uni Source #

(Closed uni, GEq uni) ⇒ Hashable (SomeTypeIn uni) Source # 
Instance details

Defined in Universe.Core

Methods

hashWithSaltIntSomeTypeIn uni → Int Source #

hashSomeTypeIn uni → Int Source #

Pretty (SomeTypeIn DefaultUni) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Pretty (SomeTypeIn uni) ⇒ Pretty (SomeTypeIn (Kinded uni)) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettySomeTypeIn (Kinded uni) → Doc ann Source #

prettyList ∷ [SomeTypeIn (Kinded uni)] → Doc ann Source #

data Kinded uni ta where Source #

Constructors

KindedTypeable k ⇒ !(uni (Esc a)) → Kinded uni (Esc (a ∷ k)) 

Instances

Instances details
GShow uni ⇒ GShow (Kinded uni ∷ TypeType) Source # 
Instance details

Defined in Universe.Core

Methods

gshowsPrec ∷ ∀ (a ∷ k). IntKinded uni a → ShowS Source #

(Typeable k, Contains uni a) ⇒ Contains (Kinded uni) (a ∷ k) Source #

A Kinded uni contains an a :: k whenever uni contains it and k is Typeable.

Instance details

Defined in Universe.Core

Methods

knownUniKinded uni (Esc a) Source #

Pretty (SomeTypeIn uni) ⇒ Pretty (SomeTypeIn (Kinded uni)) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettySomeTypeIn (Kinded uni) → Doc ann Source #

prettyList ∷ [SomeTypeIn (Kinded uni)] → Doc ann Source #

GShow uni ⇒ Show (Kinded uni ta) Source # 
Instance details

Defined in Universe.Core

Methods

showsPrecIntKinded uni ta → ShowS Source #

showKinded uni ta → String Source #

showList ∷ [Kinded uni ta] → ShowS Source #

data ValueOf uni a Source #

A value of a particular type from a universe.

Constructors

ValueOf !(uni (Esc a)) !a 

Instances

Instances details
(Closed uni, Everywhere uni NFData) ⇒ GNFData (ValueOf uni ∷ TypeType) Source # 
Instance details

Defined in Universe.Core

Methods

grnf ∷ ∀ (a ∷ k). ValueOf uni a → () Source #

(GCompare uni, Closed uni, Everywhere uni Ord, Everywhere uni Eq) ⇒ GCompare (ValueOf uni ∷ TypeType) Source # 
Instance details

Defined in Universe.Core

Methods

gcompare ∷ ∀ (a ∷ k) (b ∷ k). ValueOf uni a → ValueOf uni b → GOrdering a b Source #

(GEq uni, Closed uni, Everywhere uni Eq) ⇒ GEq (ValueOf uni ∷ TypeType) Source # 
Instance details

Defined in Universe.Core

Methods

geq ∷ ∀ (a ∷ k) (b ∷ k). ValueOf uni a → ValueOf uni b → Maybe (a :~: b) Source #

(GShow uni, Closed uni, Everywhere uni Show) ⇒ GShow (ValueOf uni ∷ TypeType) Source # 
Instance details

Defined in Universe.Core

Methods

gshowsPrec ∷ ∀ (a ∷ k). IntValueOf uni a → ShowS Source #

(Closed uni, Everywhere uni PrettyConst) ⇒ PrettyBy ConstConfig (ValueOf uni a) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyByConstConfigValueOf uni a → Doc ann Source #

prettyListByConstConfig → [ValueOf uni a] → Doc ann Source #

(Closed uni, Everywhere uni PrettyConst) ⇒ PrettyBy ConstConfig (Some (ValueOf uni)) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyByConstConfigSome (ValueOf uni) → Doc ann Source #

prettyListByConstConfig → [Some (ValueOf uni)] → Doc ann Source #

(GShow uni, Closed uni, Everywhere uni Show) ⇒ Show (ValueOf uni a) Source # 
Instance details

Defined in Universe.Core

Methods

showsPrecIntValueOf uni a → ShowS Source #

showValueOf uni a → String Source #

showList ∷ [ValueOf uni a] → ShowS Source #

(Closed uni, Everywhere uni NFData) ⇒ NFData (ValueOf uni a) Source # 
Instance details

Defined in Universe.Core

Methods

rnfValueOf uni a → () Source #

(Closed uni, Everywhere uni Flat) ⇒ Flat (Some (ValueOf uni)) Source # 
Instance details

Defined in PlutusCore.Flat

Methods

encodeSome (ValueOf uni) → Encoding Source #

decodeGet (Some (ValueOf uni)) Source #

sizeSome (ValueOf uni) → NumBitsNumBits Source #

(GEq uni, Closed uni, Everywhere uni Eq) ⇒ Eq (ValueOf uni a) Source # 
Instance details

Defined in Universe.Core

Methods

(==)ValueOf uni a → ValueOf uni a → Bool Source #

(/=)ValueOf uni a → ValueOf uni a → Bool Source #

(GCompare uni, Closed uni, Everywhere uni Ord, Everywhere uni Eq) ⇒ Ord (ValueOf uni a) Source # 
Instance details

Defined in Universe.Core

Methods

compareValueOf uni a → ValueOf uni a → Ordering Source #

(<)ValueOf uni a → ValueOf uni a → Bool Source #

(<=)ValueOf uni a → ValueOf uni a → Bool Source #

(>)ValueOf uni a → ValueOf uni a → Bool Source #

(>=)ValueOf uni a → ValueOf uni a → Bool Source #

maxValueOf uni a → ValueOf uni a → ValueOf uni a Source #

minValueOf uni a → ValueOf uni a → ValueOf uni a Source #

(Closed uni, GEq uni, Everywhere uni Eq, Everywhere uni Hashable) ⇒ Hashable (ValueOf uni a) Source # 
Instance details

Defined in Universe.Core

Methods

hashWithSaltIntValueOf uni a → Int Source #

hashValueOf uni a → Int Source #

(Closed uni, GEq uni, Everywhere uni Eq, Everywhere uni Hashable) ⇒ Hashable (Some (ValueOf uni)) Source # 
Instance details

Defined in Universe.Core

Methods

hashWithSaltIntSome (ValueOf uni) → Int Source #

hashSome (ValueOf uni) → Int Source #

(Closed uni, Everywhere uni ExMemoryUsage) ⇒ ExMemoryUsage (Some (ValueOf uni)) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemoryUsage

Methods

memoryUsageSome (ValueOf uni) → CostRose Source #

(Closed uni, Everywhere uni PrettyConst) ⇒ Pretty (ValueOf uni a) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyValueOf uni a → Doc ann Source #

prettyList ∷ [ValueOf uni a] → Doc ann Source #

(Closed uni, Everywhere uni PrettyConst) ⇒ Pretty (Some (ValueOf uni)) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettySome (ValueOf uni) → Doc ann Source #

prettyList ∷ [Some (ValueOf uni)] → Doc ann Source #

someValueOf ∷ ∀ a uni. uni (Esc a) → a → Some (ValueOf uni) Source #

Wrap a value into Some (ValueOf uni), given its explicit type tag.

someValue ∷ ∀ a uni. uni `Contains` a ⇒ a → Some (ValueOf uni) Source #

Wrap a value into Some (ValueOf uni), provided its type is in the universe.

data Esc a Source #

"Escapes" a type of an arbitrary kind to fit into Type.

class Contains uni a where Source #

A class for enumerating types and fully instantiated type formers that uni contains. For example, a particular ExampleUni may have monomorphic types in it:

instance ExampleUni Contains Integer where ... instance ExampleUni Contains Bool where ...

as well as polymorphic ones:

instance ExampleUni Contains [] where ... instance ExampleUni Contains (,) where ...

as well as their instantiations:

instance ExampleUni Contains a => ExampleUni Contains [a] where ... instance (ExampleUni Contains a, ExampleUni Contains b) => ExampleUni Contains (a, b) where ...

(a universe can have any subset of the mentioned sorts of types, for example it's fine to have instantiated polymorphic types and not have uninstantiated ones and vice versa)

Note that when used as a constraint of a function Contains does not allow you to directly express things like "uni has the Integer, Bool and [] types and type formers", because [] is not fully instantiated. So you can only say "uni has Integer, Bool, [Integer], [Bool], [[Integer]], [[Bool]] etc" and such manual enumeration is annoying, so we'd really like to be able to say that uni has lists of arbitrary built-in types (including lists of lists etc). Contains does not allow that, but Includes does. For example, in the body of the following definition:

foo :: (uni Includes Integer, uni Includes Bool, uni Includes []) => ... foo = ...

you can make use of the fact that uni has lists of arbitrary included types (integers, booleans and lists).

Hence most of the time opt for using the more flexible Includes.

Includes is defined in terms of Contains, so you only need to provide a Contains instance per type from the universe and you'll get Includes for free.

Methods

knownUni ∷ uni (Esc a) Source #

Instances

Instances details
Contains DefaultUni ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni MlResult Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni () Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUniDefaultUni (Esc ()) Source #

Contains DefaultUni Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

(Contains DefaultUni f, Contains DefaultUni a) ⇒ Contains DefaultUni (f a ∷ k2) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUniDefaultUni (Esc (f a)) Source #

(Typeable k, Contains uni a) ⇒ Contains (Kinded uni) (a ∷ k) Source #

A Kinded uni contains an a :: k whenever uni contains it and k is Typeable.

Instance details

Defined in Universe.Core

Methods

knownUniKinded uni (Esc a) Source #

Contains DefaultUni (,) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni List Source # 
Instance details

Defined in PlutusCore.Default.Universe

(TypeError NoStandalonePolymorphicDataErrMsg ∷ Constraint) ⇒ Contains uni (TyVarRepTyNameRep kind → kind) Source # 
Instance details

Defined in PlutusCore.Builtin.Polymorphism

Methods

knownUni ∷ uni (Esc TyVarRep) Source #

class Closed uni where Source #

A universe is Closed, if it's known how to constrain every type from the universe and every type can be encoded to / decoded from a sequence of integer tags. The universe doesn't have to be finite and providing support for infinite universes is the reason why we encode a type as a sequence of integer tags as opposed to a single integer tag. For example, given

  data U a where
      UList :: !(U a) -> U [a]
      UInt  :: U Int

UList (UList UInt) can be encoded to [0,0,1] where 0 and 1 are the integer tags of the UList and UInt constructors, respectively.

Associated Types

type Everywhere uni (constr ∷ TypeConstraint) ∷ Constraint Source #

A constrant for "constr a holds for any a from uni".

Methods

encodeUni ∷ uni a → [Int] Source #

Encode a type as a sequence of Int tags. The opposite of decodeUni.

withDecodedUni ∷ (∀ k (a ∷ k). Typeable k ⇒ uni (Esc a) → DecodeUniM r) → DecodeUniM r Source #

Decode a type and feed it to the continuation.

bring ∷ uni `Everywhere` constr ⇒ proxy constr → uni (Esc a) → (constr a ⇒ r) → r Source #

Bring a constr a instance in scope, provided a is a type from the universe and constr holds for any type from the universe.

Instances

Instances details
Closed DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type Everywhere DefaultUni constr Source #

Methods

encodeUniDefaultUni a → [Int] Source #

withDecodedUni ∷ (∀ k (a ∷ k). Typeable k ⇒ DefaultUni (Esc a) → DecodeUniM r) → DecodeUniM r Source #

bringEverywhere DefaultUni constr ⇒ proxy constr → DefaultUni (Esc a) → (constr a ⇒ r) → r Source #

type family EverywhereAll uni constrs where ... Source #

Equations

EverywhereAll uni '[] = () 
EverywhereAll uni (constr ': constrs) = (uni `Everywhere` constr, uni `EverywhereAll` constrs) 

knownUniOf ∷ uni `Contains` a ⇒ proxy a → uni (Esc a) Source #

Same as knownUni, but receives a proxy.

class GShow (t ∷ k → Type) where Source #

Show-like class for 1-type-parameter GADTs. GShow t => ... is equivalent to something like (forall a. Show (t a)) => .... The easiest way to create instances would probably be to write (or derive) an instance Show (T a), and then simply say:

instance GShow t where gshowsPrec = defaultGshowsPrec

Methods

gshowsPrec ∷ ∀ (a ∷ k). Int → t a → ShowS Source #

Instances

Instances details
GShow SNat 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec ∷ ∀ (a ∷ k). IntSNat a → ShowS Source #

GShow SChar 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec ∷ ∀ (a ∷ k). IntSChar a → ShowS Source #

GShow SSymbol 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec ∷ ∀ (a ∷ k). IntSSymbol a → ShowS Source #

GShow DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

gshowsPrec ∷ ∀ (a ∷ k). IntDefaultUni a → ShowS Source #

GShow uni ⇒ GShow (Kinded uni ∷ TypeType) Source # 
Instance details

Defined in Universe.Core

Methods

gshowsPrec ∷ ∀ (a ∷ k). IntKinded uni a → ShowS Source #

(GShow uni, Closed uni, Everywhere uni Show) ⇒ GShow (ValueOf uni ∷ TypeType) Source # 
Instance details

Defined in Universe.Core

Methods

gshowsPrec ∷ ∀ (a ∷ k). IntValueOf uni a → ShowS Source #

GShow (TypeRep ∷ k → Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec ∷ ∀ (a ∷ k0). IntTypeRep a → ShowS Source #

GShow ((:~:) a ∷ k → Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec ∷ ∀ (a0 ∷ k0). Int → (a :~: a0) → ShowS Source #

GShow (GOrdering a ∷ k → Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec ∷ ∀ (a0 ∷ k0). IntGOrdering a a0 → ShowS Source #

(GShow a, GShow b) ⇒ GShow (Product a b ∷ k → Type)
>>> gshow (Pair Refl Refl :: Product ((:~:) Int) ((:~:) Int) Int)
"Pair Refl Refl"
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec ∷ ∀ (a0 ∷ k0). IntProduct a b a0 → ShowS Source #

(GShow a, GShow b) ⇒ GShow (Sum a b ∷ k → Type)
>>> gshow (InL Refl :: Sum ((:~:) Int) ((:~:) Bool) Int)
"InL Refl"
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec ∷ ∀ (a0 ∷ k0). IntSum a b a0 → ShowS Source #

GShow ((:~~:) a ∷ k → Type)

Since: some-1.0.4

Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec ∷ ∀ (a0 ∷ k0). Int → (a :~~: a0) → ShowS Source #

(GShow a, GShow b) ⇒ GShow (a :*: b ∷ k → Type)
>>> gshow (Pair Refl Refl :: Product ((:~:) Int) ((:~:) Int) Int)
"Refl :*: Refl"

Since: some-1.0.4

Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec ∷ ∀ (a0 ∷ k0). Int → (a :*: b) a0 → ShowS Source #

(GShow a, GShow b) ⇒ GShow (a :+: b ∷ k → Type)
>>> gshow (L1 Refl :: ((:~:) Int :+: (:~:) Bool) Int)
"L1 Refl"

Since: some-1.0.4

Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec ∷ ∀ (a0 ∷ k0). Int → (a :+: b) a0 → ShowS Source #

showShow a ⇒ a → String Source #

A specialised variant of showsPrec, using precedence context zero, and returning an ordinary String.

class GEq (f ∷ k → Type) where Source #

A class for type-contexts which contain enough information to (at least in some cases) decide the equality of types occurring within them.

This class is sometimes confused with TestEquality from base. TestEquality only checks type equality.

Consider

>>> data Tag a where TagInt1 :: Tag Int; TagInt2 :: Tag Int

The correct TestEquality Tag instance is

>>> :{
instance TestEquality Tag where
    testEquality TagInt1 TagInt1 = Just Refl
    testEquality TagInt1 TagInt2 = Just Refl
    testEquality TagInt2 TagInt1 = Just Refl
    testEquality TagInt2 TagInt2 = Just Refl
:}

While we can define

instance GEq Tag where
   geq = testEquality

this will mean we probably want to have

instance Eq Tag where
   _ == _ = True

Note: In the future version of some package (to be released around GHC-9.6 / 9.8) the forall a. Eq (f a) constraint will be added as a constraint to GEq, with a law relating GEq and Eq:

geq x y = Just Refl   ⇒  x == y = True        ∀ (x :: f a) (y :: f b)
x == y                ≡  isJust (geq x y)     ∀ (x, y :: f a)

So, the more useful GEq Tag instance would differentiate between different constructors:

>>> :{
instance GEq Tag where
    geq TagInt1 TagInt1 = Just Refl
    geq TagInt1 TagInt2 = Nothing
    geq TagInt2 TagInt1 = Nothing
    geq TagInt2 TagInt2 = Just Refl
:}

which is consistent with a derived Eq instance for Tag

>>> deriving instance Eq (Tag a)

Note that even if a ~ b, the geq (x :: f a) (y :: f b) may be Nothing (when value terms are inequal).

The consistency of GEq and Eq is easy to check by exhaustion:

>>> let checkFwdGEq :: (forall a. Eq (f a), GEq f) => f a -> f b -> Bool; checkFwdGEq x y = case geq x y of Just Refl -> x == y; Nothing -> True
>>> (checkFwdGEq TagInt1 TagInt1, checkFwdGEq TagInt1 TagInt2, checkFwdGEq TagInt2 TagInt1, checkFwdGEq TagInt2 TagInt2)
(True,True,True,True)
>>> let checkBwdGEq :: (Eq (f a), GEq f) => f a -> f a -> Bool; checkBwdGEq x y = if x == y then isJust (geq x y) else isNothing (geq x y)
>>> (checkBwdGEq TagInt1 TagInt1, checkBwdGEq TagInt1 TagInt2, checkBwdGEq TagInt2 TagInt1, checkBwdGEq TagInt2 TagInt2)
(True,True,True,True)

Methods

geq ∷ ∀ (a ∷ k) (b ∷ k). f a → f b → Maybe (a :~: b) Source #

Produce a witness of type-equality, if one exists.

A handy idiom for using this would be to pattern-bind in the Maybe monad, eg.:

extract :: GEq tag => tag a -> DSum tag -> Maybe a
extract t1 (t2 :=> x) = do
    Refl <- geq t1 t2
    return x

Or in a list comprehension:

extractMany :: GEq tag => tag a -> [DSum tag] -> [a]
extractMany t1 things = [ x | (t2 :=> x) <- things, Refl <- maybeToList (geq t1 t2)]

(Making use of the DSum type from Data.Dependent.Sum in both examples)

Instances

Instances details
GEq SNat 
Instance details

Defined in Data.GADT.Internal

Methods

geq ∷ ∀ (a ∷ k) (b ∷ k). SNat a → SNat b → Maybe (a :~: b) Source #

GEq SChar 
Instance details

Defined in Data.GADT.Internal

Methods

geq ∷ ∀ (a ∷ k) (b ∷ k). SChar a → SChar b → Maybe (a :~: b) Source #

GEq SSymbol 
Instance details

Defined in Data.GADT.Internal

Methods

geq ∷ ∀ (a ∷ k) (b ∷ k). SSymbol a → SSymbol b → Maybe (a :~: b) Source #

GEq DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

geq ∷ ∀ (a ∷ k) (b ∷ k). DefaultUni a → DefaultUni b → Maybe (a :~: b) Source #

(GEq uni, Closed uni, Everywhere uni Eq) ⇒ GEq (ValueOf uni ∷ TypeType) Source # 
Instance details

Defined in Universe.Core

Methods

geq ∷ ∀ (a ∷ k) (b ∷ k). ValueOf uni a → ValueOf uni b → Maybe (a :~: b) Source #

GEq (TypeRep ∷ k → Type) 
Instance details

Defined in Data.GADT.Internal

Methods

geq ∷ ∀ (a ∷ k0) (b ∷ k0). TypeRep a → TypeRep b → Maybe (a :~: b) Source #

GEq ((:~:) a ∷ k → Type) 
Instance details

Defined in Data.GADT.Internal

Methods

geq ∷ ∀ (a0 ∷ k0) (b ∷ k0). (a :~: a0) → (a :~: b) → Maybe (a0 :~: b) Source #

(GEq a, GEq b) ⇒ GEq (Product a b ∷ k → Type) 
Instance details

Defined in Data.GADT.Internal

Methods

geq ∷ ∀ (a0 ∷ k0) (b0 ∷ k0). Product a b a0 → Product a b b0 → Maybe (a0 :~: b0) Source #

(GEq a, GEq b) ⇒ GEq (Sum a b ∷ k → Type) 
Instance details

Defined in Data.GADT.Internal

Methods

geq ∷ ∀ (a0 ∷ k0) (b0 ∷ k0). Sum a b a0 → Sum a b b0 → Maybe (a0 :~: b0) Source #

GEq ((:~~:) a ∷ k → Type)

Since: some-1.0.4

Instance details

Defined in Data.GADT.Internal

Methods

geq ∷ ∀ (a0 ∷ k0) (b ∷ k0). (a :~~: a0) → (a :~~: b) → Maybe (a0 :~: b) Source #

(GEq a, GEq b) ⇒ GEq (a :*: b ∷ k → Type)

Since: some-1.0.4

Instance details

Defined in Data.GADT.Internal

Methods

geq ∷ ∀ (a0 ∷ k0) (b0 ∷ k0). (a :*: b) a0 → (a :*: b) b0 → Maybe (a0 :~: b0) Source #

(GEq f, GEq g) ⇒ GEq (f :+: g ∷ k → Type)

Since: some-1.0.4

Instance details

Defined in Data.GADT.Internal

Methods

geq ∷ ∀ (a ∷ k0) (b ∷ k0). (f :+: g) a → (f :+: g) b → Maybe (a :~: b) Source #

class HasUniApply (uni ∷ TypeType) where Source #

A class for "uni has general type application".

Methods

uniApply ∷ ∀ k l (f ∷ k → l) a. uni (Esc f) → uni (Esc a) → uni (Esc (f a)) Source #

Apply a type constructor to an argument.

matchUniApply Source #

Arguments

∷ uni tb

The type.

→ r

What to return if the type is not an application.

→ (∀ k l (f ∷ k → l) a. tb ~ Esc (f a) ⇒ uni (Esc f) → uni (Esc a) → r)

The continuation taking a function and an argument.

→ r 

Deconstruct a type application into the function and the argument and feed them to the continuation. If the type is not an application, then return the default value.

Instances

Instances details
HasUniApply DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

uniApply ∷ ∀ k l (f ∷ k → l) (a ∷ k). DefaultUni (Esc f) → DefaultUni (Esc a) → DefaultUni (Esc (f a)) Source #

matchUniApplyDefaultUni tb → r → (∀ k l (f ∷ k → l) (a ∷ k). tb ~ Esc (f a) ⇒ DefaultUni (Esc f) → DefaultUni (Esc a) → r) → r Source #

checkStar ∷ ∀ uni a (x ∷ a). Typeable a ⇒ uni (Esc x) → Maybe (a :~: Type) Source #

Check if the kind of the given type from the universe is Type.

withApplicable ∷ ∀ (a ∷ Type) (ab ∷ Type) f x uni m r. (Typeable ab, Typeable a, MonadPlus m) ⇒ uni (Esc (f ∷ ab)) → uni (Esc (x ∷ a)) → (∀ (b ∷ Type). (Typeable b, ab ~ (a → b)) ⇒ m r) → m r Source #

Check if one type from the universe can be applied to another (i.e. check that the expected kind of the argument matches the actual one) and call the continuation in the refined context. Fail with mzero otherwise.

data (a ∷ k) :~: (b ∷ k) where infix 4 Source #

Propositional equality. If a :~: b is inhabited by some terminating value, then the type a is the same as the type b. To use this equality in practice, pattern-match on the a :~: b to get out the Refl constructor; in the body of the pattern-match, the compiler knows that a ~ b.

Since: base-4.7.0.0

Constructors

Refl ∷ ∀ {k} (a ∷ k). a :~: a 

Instances

Instances details
Category ((:~:) ∷ k → k → Type)

Since: base-4.7.0.0

Instance details

Defined in Control.Category

Methods

id ∷ ∀ (a ∷ k0). a :~: a Source #

(.) ∷ ∀ (b ∷ k0) (c ∷ k0) (a ∷ k0). (b :~: c) → (a :~: b) → a :~: c Source #

TestEquality ((:~:) a ∷ k → Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

testEquality ∷ ∀ (a0 ∷ k0) (b ∷ k0). (a :~: a0) → (a :~: b) → Maybe (a0 :~: b) Source #

GNFData ((:~:) a ∷ k → Type)

Since: some-1.0.3

Instance details

Defined in Data.GADT.DeepSeq

Methods

grnf ∷ ∀ (a0 ∷ k0). (a :~: a0) → () Source #

GCompare ((:~:) a ∷ k → Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gcompare ∷ ∀ (a0 ∷ k0) (b ∷ k0). (a :~: a0) → (a :~: b) → GOrdering a0 b Source #

GEq ((:~:) a ∷ k → Type) 
Instance details

Defined in Data.GADT.Internal

Methods

geq ∷ ∀ (a0 ∷ k0) (b ∷ k0). (a :~: a0) → (a :~: b) → Maybe (a0 :~: b) Source #

GRead ((:~:) a ∷ k → Type) 
Instance details

Defined in Data.GADT.Internal

Methods

greadsPrecIntGReadS ((:~:) a) Source #

GShow ((:~:) a ∷ k → Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec ∷ ∀ (a0 ∷ k0). Int → (a :~: a0) → ShowS Source #

NFData2 ((:~:)TypeTypeType)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 ∷ (a → ()) → (b → ()) → (a :~: b) → () Source #

NFData1 ((:~:) a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf ∷ (a0 → ()) → (a :~: a0) → () Source #

(a ~ b, Data a) ⇒ Data (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Data

Methods

gfoldl ∷ (∀ d b0. Data d ⇒ c (d → b0) → d → c b0) → (∀ g. g → c g) → (a :~: b) → c (a :~: b) Source #

gunfold ∷ (∀ b0 r. Data b0 ⇒ c (b0 → r) → c r) → (∀ r. r → c r) → Constr → c (a :~: b) Source #

toConstr ∷ (a :~: b) → Constr Source #

dataTypeOf ∷ (a :~: b) → DataType Source #

dataCast1Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c (a :~: b)) Source #

dataCast2Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c (a :~: b)) Source #

gmapT ∷ (∀ b0. Data b0 ⇒ b0 → b0) → (a :~: b) → a :~: b Source #

gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → (a :~: b) → r Source #

gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → (a :~: b) → r Source #

gmapQ ∷ (∀ d. Data d ⇒ d → u) → (a :~: b) → [u] Source #

gmapQiInt → (∀ d. Data d ⇒ d → u) → (a :~: b) → u Source #

gmapMMonad m ⇒ (∀ d. Data d ⇒ d → m d) → (a :~: b) → m (a :~: b) Source #

gmapMpMonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → (a :~: b) → m (a :~: b) Source #

gmapMoMonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → (a :~: b) → m (a :~: b) Source #

a ~ b ⇒ Bounded (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

minBound ∷ a :~: b Source #

maxBound ∷ a :~: b Source #

a ~ b ⇒ Enum (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

succ ∷ (a :~: b) → a :~: b Source #

pred ∷ (a :~: b) → a :~: b Source #

toEnumInt → a :~: b Source #

fromEnum ∷ (a :~: b) → Int Source #

enumFrom ∷ (a :~: b) → [a :~: b] Source #

enumFromThen ∷ (a :~: b) → (a :~: b) → [a :~: b] Source #

enumFromTo ∷ (a :~: b) → (a :~: b) → [a :~: b] Source #

enumFromThenTo ∷ (a :~: b) → (a :~: b) → (a :~: b) → [a :~: b] Source #

a ~ b ⇒ Read (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Show (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

showsPrecInt → (a :~: b) → ShowS Source #

show ∷ (a :~: b) → String Source #

showList ∷ [a :~: b] → ShowS Source #

NFData (a :~: b)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf ∷ (a :~: b) → () Source #

Eq (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

(==) ∷ (a :~: b) → (a :~: b) → Bool Source #

(/=) ∷ (a :~: b) → (a :~: b) → Bool Source #

Ord (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

compare ∷ (a :~: b) → (a :~: b) → Ordering Source #

(<) ∷ (a :~: b) → (a :~: b) → Bool Source #

(<=) ∷ (a :~: b) → (a :~: b) → Bool Source #

(>) ∷ (a :~: b) → (a :~: b) → Bool Source #

(>=) ∷ (a :~: b) → (a :~: b) → Bool Source #

max ∷ (a :~: b) → (a :~: b) → a :~: b Source #

min ∷ (a :~: b) → (a :~: b) → a :~: b Source #

type (<:) uni1 uni2 = uni1 `Everywhere` Includes uni2 Source #

A constraint for "uni1 is a subuniverse of uni2".

type HasTypeLevel uni x = KnownTypeAst Void uni (ElaborateBuiltin uni x) Source #

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

type HasTermLevel uni = Includes uni Source #

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

type HasTypeAndTermLevel uni x = (uni `HasTypeLevel` x, uni `HasTermLevel` x) Source #

The product of HasTypeLevel and HasTermLevel.

data DefaultUni a where Source #

The universe used by default.

Instances

Instances details
ToKind DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

toSingKind ∷ ∀ k (a ∷ k). DefaultUni (Esc a) → SingKind k Source #

TestTypesFromTheUniverseAreAllKnown DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Closed DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type Everywhere DefaultUni constr Source #

Methods

encodeUniDefaultUni a → [Int] Source #

withDecodedUni ∷ (∀ k (a ∷ k). Typeable k ⇒ DefaultUni (Esc a) → DecodeUniM r) → DecodeUniM r Source #

bringEverywhere DefaultUni constr ⇒ proxy constr → DefaultUni (Esc a) → (constr a ⇒ r) → r Source #

HasUniApply DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

uniApply ∷ ∀ k l (f ∷ k → l) (a ∷ k). DefaultUni (Esc f) → DefaultUni (Esc a) → DefaultUni (Esc (f a)) Source #

matchUniApplyDefaultUni tb → r → (∀ k l (f ∷ k → l) (a ∷ k). tb ~ Esc (f a) ⇒ DefaultUni (Esc f) → DefaultUni (Esc a) → r) → r Source #

GEq DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

geq ∷ ∀ (a ∷ k) (b ∷ k). DefaultUni a → DefaultUni b → Maybe (a :~: b) Source #

GShow DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

gshowsPrec ∷ ∀ (a ∷ k). IntDefaultUni a → ShowS Source #

UniOf term ~ DefaultUniMakeKnownIn DefaultUni term Void Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Methods

makeKnownVoidBuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term Int16 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownInt16BuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term Int32 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownInt32BuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term Int64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownInt64BuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term Int8 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownInt8BuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term Word16 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownWord16BuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term Word32 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownWord32BuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term Word64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownWord64BuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term Word8 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownWord8BuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term ByteStringMakeKnownIn DefaultUni term ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeIn DefaultUni term ElementMakeKnownIn DefaultUni term Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownElementBuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term ElementMakeKnownIn DefaultUni term Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownElementBuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term MlResultMakeKnownIn DefaultUni term MlResult Source # 
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeIn DefaultUni term DataMakeKnownIn DefaultUni term Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownDataBuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term IntegerCostedLiterally Source # 
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term NumBytesCostedAsNumWords Source # 
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeIn DefaultUni term TextMakeKnownIn DefaultUni term Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownTextBuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownIntegerBuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term Natural Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownNaturalBuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term () ⇒ MakeKnownIn DefaultUni term () Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown ∷ () → BuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term BoolMakeKnownIn DefaultUni term Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownBoolBuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term Int Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownIntBuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term Word Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownWordBuiltinResult term Source #

UniOf term ~ DefaultUniReadKnownIn DefaultUni term Void Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Methods

readKnown ∷ term → ReadKnownM Void Source #

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term Int16 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Int16 Source #

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term Int32 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Int32 Source #

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term Int64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Int64 Source #

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term Int8 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Int8 Source #

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term Word16 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Word16 Source #

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term Word32 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Word32 Source #

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term Word64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Word64 Source #

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term Word8 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Word8 Source #

KnownBuiltinTypeIn DefaultUni term ByteStringReadKnownIn DefaultUni term ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM ByteString Source #

KnownBuiltinTypeIn DefaultUni term ElementReadKnownIn DefaultUni term Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Element Source #

KnownBuiltinTypeIn DefaultUni term ElementReadKnownIn DefaultUni term Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Element Source #

KnownBuiltinTypeIn DefaultUni term MlResultReadKnownIn DefaultUni term MlResult Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM MlResult Source #

KnownBuiltinTypeIn DefaultUni term DataReadKnownIn DefaultUni term Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Data Source #

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term IntegerCostedLiterally Source # 
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term NumBytesCostedAsNumWords Source # 
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeIn DefaultUni term TextReadKnownIn DefaultUni term Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Text Source #

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Integer Source #

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term Natural Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Natural Source #

KnownBuiltinTypeIn DefaultUni term () ⇒ ReadKnownIn DefaultUni term () Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM () Source #

KnownBuiltinTypeIn DefaultUni term BoolReadKnownIn DefaultUni term Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Bool Source #

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term Int Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Int Source #

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term Word Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Word Source #

Contains DefaultUni ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni MlResult Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni () Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUniDefaultUni (Esc ()) Source #

Contains DefaultUni Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

tyname ~ TyNameKnownTypeAst tyname DefaultUni Void Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Methods

typeAstType tyname DefaultUni () Source #

KnownTypeAst tyname DefaultUni Int16 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownTypeAst tyname DefaultUni Int32 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownTypeAst tyname DefaultUni Int64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownTypeAst tyname DefaultUni Int8 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownTypeAst tyname DefaultUni Word16 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownTypeAst tyname DefaultUni Word32 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownTypeAst tyname DefaultUni Word64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownTypeAst tyname DefaultUni Word8 Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownBuiltinTypeAst tyname DefaultUni ByteStringKnownTypeAst tyname DefaultUni ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownBuiltinTypeAst tyname DefaultUni ElementKnownTypeAst tyname DefaultUni Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownBuiltinTypeAst tyname DefaultUni ElementKnownTypeAst tyname DefaultUni Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownBuiltinTypeAst tyname DefaultUni MlResultKnownTypeAst tyname DefaultUni MlResult Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownBuiltinTypeAst tyname DefaultUni DataKnownTypeAst tyname DefaultUni Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownTypeAst tyname DefaultUni IntegerCostedLiterally Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownTypeAst tyname DefaultUni NumBytesCostedAsNumWords Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownBuiltinTypeAst tyname DefaultUni TextKnownTypeAst tyname DefaultUni Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownBuiltinTypeAst tyname DefaultUni IntegerKnownTypeAst tyname DefaultUni Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownTypeAst tyname DefaultUni Natural Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownBuiltinTypeAst tyname DefaultUni () ⇒ KnownTypeAst tyname DefaultUni () Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type IsBuiltin DefaultUni () ∷ Bool Source #

type ToHoles DefaultUni () ∷ [Hole] Source #

type ToBinds DefaultUni acc () ∷ [Some TyNameRep] Source #

Methods

typeAstType tyname DefaultUni () Source #

KnownBuiltinTypeAst tyname DefaultUni BoolKnownTypeAst tyname DefaultUni Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownTypeAst tyname DefaultUni Int Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownTypeAst tyname DefaultUni Word Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

KnownTypeAst tyname DefaultUni a ⇒ KnownTypeAst tyname DefaultUni (ListCostedByLength a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType0 tyname DefaultUni () Source #

KnownBuiltinTypeAst tyname DefaultUni [a] ⇒ KnownTypeAst tyname DefaultUni ([a] ∷ Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type IsBuiltin DefaultUni [a] ∷ Bool Source #

type ToHoles DefaultUni [a] ∷ [Hole] Source #

type ToBinds DefaultUni acc [a] ∷ [Some TyNameRep] Source #

Methods

typeAstType0 tyname DefaultUni () Source #

KnownBuiltinTypeAst tyname DefaultUni (a, b) ⇒ KnownTypeAst tyname DefaultUni ((a, b) ∷ Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type IsBuiltin DefaultUni (a, b) ∷ Bool Source #

type ToHoles DefaultUni (a, b) ∷ [Hole] Source #

type ToBinds DefaultUni acc (a, b) ∷ [Some TyNameRep] Source #

Methods

typeAstType0 tyname DefaultUni () Source #

KnownBuiltinTypeIn DefaultUni term [a] ⇒ MakeKnownIn DefaultUni term (ListCostedByLength a) Source # 
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeIn DefaultUni term [a] ⇒ MakeKnownIn DefaultUni term [a] Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown ∷ [a] → BuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term [a] ⇒ ReadKnownIn DefaultUni term (ListCostedByLength a) Source # 
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeIn DefaultUni term [a] ⇒ ReadKnownIn DefaultUni term [a] Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM [a] Source #

(Contains DefaultUni f, Contains DefaultUni a) ⇒ Contains DefaultUni (f a ∷ k2) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUniDefaultUni (Esc (f a)) Source #

KnownBuiltinTypeIn DefaultUni term (a, b) ⇒ MakeKnownIn DefaultUni term (a, b) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown ∷ (a, b) → BuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term (a, b) ⇒ ReadKnownIn DefaultUni term (a, b) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM (a, b) Source #

MakeKnownIn DefaultUni term a ⇒ MakeKnownIn DefaultUni term (MetaForall name a) Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Methods

makeKnownMetaForall name a → BuiltinResult term Source #

PrettyBy RenderContext (DefaultUni a) Source # 
Instance details

Defined in PlutusCore.Default.Universe

PrettyBy RenderContext (SomeTypeIn DefaultUni) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Show (DefaultUni a) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Pretty (DefaultUni a) Source #

This always pretty-prints parens around type applications (e.g. (list bool)) and doesn't pretty-print them otherwise (e.g. integer).

Instance details

Defined in PlutusCore.Default.Universe

Methods

prettyDefaultUni a → Doc ann Source #

prettyList ∷ [DefaultUni a] → Doc ann Source #

Pretty (SomeTypeIn DefaultUni) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni (,) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni List Source # 
Instance details

Defined in PlutusCore.Default.Universe

type Everywhere DefaultUni constr Source # 
Instance details

Defined in PlutusCore.Default.Universe

type Everywhere DefaultUni constr = (Permits constr Integer, Permits constr ByteString, Permits constr Text, Permits constr (), Permits constr Bool, Permits constr List, Permits constr (,), Permits constr Data, Permits constr Element, Permits constr Element, Permits constr MlResult)
type IsBuiltin DefaultUni Void Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

type IsBuiltin DefaultUni Int16 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Int32 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Int64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Int8 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Word16 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Word32 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Word64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Word8 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni MlResult Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni IntegerCostedLiterally Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni NumBytesCostedAsNumWords Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Natural Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni () Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Int Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni Word Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Void Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

type ToHoles DefaultUni Void = '[] ∷ [Hole]
type ToHoles DefaultUni Int16 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Int32 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Int64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Int8 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Word16 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Word32 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Word64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Word8 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni MlResult Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni IntegerCostedLiterally Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni NumBytesCostedAsNumWords Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Natural Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni () Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Int Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Word Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ElaborateBuiltin DefaultUni (x ∷ a) Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Void Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

type ToBinds DefaultUni acc Void = acc
type ToBinds DefaultUni acc Int16 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Int32 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Int64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Int8 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Word16 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Word32 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Word64 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Word8 Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Element Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc MlResult Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc IntegerCostedLiterally Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc NumBytesCostedAsNumWords Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Natural Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc () Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Int Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Word Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc (ListCostedByLength a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc ([a] ∷ Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc ((a, b) ∷ Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc ((a, b) ∷ Type) = ToBinds DefaultUni acc (ElaborateBuiltin DefaultUni (a, b))
type IsBuiltin DefaultUni (ListCostedByLength a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni ([a] ∷ Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni (ListCostedByLength a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni ([a] ∷ Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

type IsBuiltin DefaultUni ((a, b) ∷ Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni ((a, b) ∷ Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

pattern DefaultUniList ∷ ∀ {a} {k1} {k2} {f ∷ k1 → k2} {a1 ∷ k1}. () ⇒ ∀. (a ~ Esc (f a1), Esc f ~ Esc List) ⇒ DefaultUni (Esc a1) → DefaultUni a Source #

pattern DefaultUniPair ∷ ∀ {a} {k1} {k2} {f1 ∷ k1 → k2} {a1 ∷ k1} {k3} {k4} {f2 ∷ k3 → k4} {a2 ∷ k3}. () ⇒ ∀. (a ~ Esc (f1 a1), Esc f1 ~ Esc (f2 a2), Esc f2 ~ Esc (,)) ⇒ DefaultUni (Esc a2) → DefaultUni (Esc a1) → DefaultUni a Source #

data DefaultFun Source #

Default built-in functions.

When updating these, make sure to add them to the protocol version listing! See Note [New builtins/language versions and protocol versions]

Instances

Instances details
Bounded DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Enum DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Generic DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Associated Types

type Rep DefaultFunTypeType Source #

Ix DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Show DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

NFData DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Methods

rnfDefaultFun → () Source #

Flat DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Eq DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Ord DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Hashable DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

ExMemoryUsage DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Pretty DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Methods

prettyDefaultFunDoc ann Source #

prettyList ∷ [DefaultFun] → Doc ann Source #

uni ~ DefaultUniToBuiltinMeaning uni DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

PrettyBy PrettyConfigPlc DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Bounded (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Enum (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Generic (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Associated Types

type Rep (BuiltinSemanticsVariant DefaultFun) ∷ TypeType Source #

Show (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Default (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

NFData (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Eq (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

NoThunks (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Pretty (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

type Rep DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

type Rep DefaultFun = D1 ('MetaData "DefaultFun" "PlutusCore.Default.Builtins" "plutus-core-1.34.0.0-inplace" 'False) ((((((C1 ('MetaCons "AddInteger" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "SubtractInteger" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "MultiplyInteger" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "DivideInteger" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "QuotientInteger" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "RemainderInteger" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "ModInteger" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "EqualsInteger" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "LessThanInteger" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "LessThanEqualsInteger" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "AppendByteString" 'PrefixI 'False) (U1TypeType))))) :+: (((C1 ('MetaCons "ConsByteString" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "SliceByteString" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "LengthOfByteString" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "IndexByteString" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "EqualsByteString" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "LessThanByteString" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "LessThanEqualsByteString" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Sha2_256" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "Sha3_256" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "Blake2b_256" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "VerifyEd25519Signature" 'PrefixI 'False) (U1TypeType)))))) :+: ((((C1 ('MetaCons "VerifyEcdsaSecp256k1Signature" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "VerifySchnorrSecp256k1Signature" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "AppendString" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "EqualsString" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "EncodeUtf8" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "DecodeUtf8" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "IfThenElse" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "ChooseUnit" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "Trace" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "FstPair" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "SndPair" 'PrefixI 'False) (U1TypeType))))) :+: (((C1 ('MetaCons "ChooseList" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "MkCons" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "HeadList" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "TailList" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "NullList" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "ChooseData" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "ConstrData" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "MapData" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "ListData" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "IData" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "BData" 'PrefixI 'False) (U1TypeType))))))) :+: (((((C1 ('MetaCons "UnConstrData" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "UnMapData" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "UnListData" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "UnIData" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "UnBData" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "EqualsData" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "SerialiseData" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "MkPairData" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "MkNilData" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "MkNilPairData" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Bls12_381_G1_add" 'PrefixI 'False) (U1TypeType))))) :+: (((C1 ('MetaCons "Bls12_381_G1_neg" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Bls12_381_G1_scalarMul" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "Bls12_381_G1_equal" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "Bls12_381_G1_hashToGroup" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Bls12_381_G1_compress" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "Bls12_381_G1_uncompress" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "Bls12_381_G2_add" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Bls12_381_G2_neg" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "Bls12_381_G2_scalarMul" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "Bls12_381_G2_equal" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Bls12_381_G2_hashToGroup" 'PrefixI 'False) (U1TypeType)))))) :+: ((((C1 ('MetaCons "Bls12_381_G2_compress" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Bls12_381_G2_uncompress" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "Bls12_381_millerLoop" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "Bls12_381_mulMlResult" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "Bls12_381_finalVerify" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "Keccak_256" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "Blake2b_224" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "IntegerToByteString" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "ByteStringToInteger" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "AndByteString" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "OrByteString" 'PrefixI 'False) (U1TypeType))))) :+: (((C1 ('MetaCons "XorByteString" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "ComplementByteString" 'PrefixI 'False) (U1TypeType)) :+: (C1 ('MetaCons "ReadBit" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "WriteBits" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "ReplicateByte" 'PrefixI 'False) (U1TypeType)))) :+: ((C1 ('MetaCons "ShiftByteString" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "RotateByteString" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "CountSetBits" 'PrefixI 'False) (U1TypeType))) :+: (C1 ('MetaCons "FindFirstSetBit" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "Ripemd_160" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "ExpModInteger" 'PrefixI 'False) (U1TypeType))))))))
data BuiltinSemanticsVariant DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

type CostingPart uni DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

type Rep (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

type Rep (BuiltinSemanticsVariant DefaultFun) = D1 ('MetaData "BuiltinSemanticsVariant" "PlutusCore.Default.Builtins" "plutus-core-1.34.0.0-inplace" 'False) (C1 ('MetaCons "DefaultFunSemanticsVariantA" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "DefaultFunSemanticsVariantB" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "DefaultFunSemanticsVariantC" 'PrefixI 'False) (U1TypeType)))

AST

data Term tyname name uni fun ann Source #

Constructors

Var ann name

a named variable

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

lambda abstraction

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

application

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

type abstraction

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

instantiation

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

wrapping

Unwrap ann (Term tyname name uni fun ann)

unwrapping See Note [Constr tag type]

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

constructor

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

case

Constant ann (Some (ValueOf uni))

constants

Builtin ann fun

builtin functions

Error ann (Type tyname uni ann)

fail with error

Instances

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

prettyByPrettyConfigPlcTerm tyname name uni fun ann → Doc ann0 Source #

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

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

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

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

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

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

Defined in PlutusCore.Error

Methods

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

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

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

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

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

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

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

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

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

Defined in PlutusCore.Core.Type

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

collectScopeInfoTerm tyname name uni fun NameAnnScopeErrorOrInfo Source #

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

establishScopingTerm tyname name uni fun ann → Quote (Term tyname name uni fun NameAnn) Source #

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

Defined in PlutusCore.MkPlc

Methods

var ∷ ann → name → Term tyname name uni fun ann Source #

tyAbs ∷ ann → tyname → Kind ann → Term tyname name uni fun ann → Term tyname name uni fun ann Source #

lamAbs ∷ ann → name → Type tyname uni ann → Term tyname name uni fun ann → Term tyname name uni fun ann Source #

apply ∷ ann → Term tyname name uni fun ann → Term tyname name uni fun ann → Term tyname name uni fun ann Source #

constant ∷ ann → Some (ValueOf uni) → Term tyname name uni fun ann Source #

builtin ∷ ann → fun → Term tyname name uni fun ann Source #

tyInst ∷ ann → Term tyname name uni fun ann → Type tyname uni ann → Term tyname name uni fun ann Source #

unwrap ∷ ann → Term tyname name uni fun ann → Term tyname name uni fun ann Source #

iWrap ∷ ann → Type tyname uni ann → Type tyname uni ann → Term tyname name uni fun ann → Term tyname name uni fun ann Source #

error ∷ ann → Type tyname uni ann → Term tyname name uni fun ann Source #

constr ∷ ann → Type tyname uni ann → Word64 → [Term tyname name uni fun ann] → Term tyname name uni fun ann Source #

kase ∷ ann → Type tyname uni ann → Term tyname name uni fun ann → [Term tyname name uni fun ann] → Term tyname name uni fun ann Source #

termLet ∷ ann → TermDef (Term tyname name uni fun) tyname name uni ann → Term tyname name uni fun ann → Term tyname name uni fun ann Source #

typeLet ∷ ann → TypeDef tyname uni ann → Term tyname name uni fun ann → Term tyname name uni fun ann Source #

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

Defined in PlutusCore.Core.Type

Associated Types

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

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

showsPrecIntTerm tyname name uni fun ann → ShowS Source #

showTerm tyname name uni fun ann → String Source #

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

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

Defined in PlutusCore.Core.Type

Methods

rnfTerm 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

encodeTerm tyname name uni fun ann → Encoding Source #

decodeGet (Term tyname name uni fun ann) Source #

sizeTerm tyname name uni fun ann → NumBitsNumBits Source #

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

Defined in PlutusCore.Core.Instance.Eq

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

Defined in PlutusCore.Core.Instance.Eq

Methods

(==)Term TyDeBruijn DeBruijn uni fun ann → Term TyDeBruijn DeBruijn uni fun ann → Bool Source #

(/=)Term TyDeBruijn DeBruijn uni fun ann → Term TyDeBruijn DeBruijn uni fun ann → Bool Source #

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

Defined in PlutusCore.Core.Instance.Eq

Methods

(==)Term TyName Name uni fun ann → Term TyName Name uni fun ann → Bool Source #

(/=)Term TyName Name uni fun ann → Term TyName Name uni fun ann → Bool Source #

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

Defined in PlutusCore.Builtin.HasConstant

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

memoryUsageTerm tyname name uni fun ann → CostRose Source #

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

Defined in PlutusCore.Rename

Methods

renameMonadQuote m ⇒ Term tyname name uni fun ann → m (Term tyname name uni fun ann) Source #

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

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

prettyTerm tyname name uni fun ann → Doc ann0 Source #

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

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.34.0.0-inplace" 'False) (((C1 ('MetaCons "Var" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 name)) :+: (C1 ('MetaCons "LamAbs" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 name)) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)))) :+: C1 ('MetaCons "Apply" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)))))) :+: (C1 ('MetaCons "TyAbs" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tyname)) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ann)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)))) :+: (C1 ('MetaCons "TyInst" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))) :+: C1 ('MetaCons "IWrap" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann))) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann))))))) :+: ((C1 ('MetaCons "Unwrap" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann))) :+: (C1 ('MetaCons "Constr" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann))) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Term tyname name uni fun ann]))) :+: C1 ('MetaCons "Case" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann))) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Term tyname name uni fun ann]))))) :+: (C1 ('MetaCons "Constant" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Some (ValueOf uni)))) :+: (C1 ('MetaCons "Builtin" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 fun)) :+: C1 ('MetaCons "Error" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))))))
type HasUniques (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

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

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

Get all the direct child Terms of the given Term.

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

Get all the direct child Kinds of the given Term.

termMapNames ∷ ∀ tyname tyname' name name' uni fun ann. (tyname → tyname') → (name → name') → Term tyname name uni fun ann → Term tyname' name' uni fun ann Source #

programMapNames ∷ ∀ tyname tyname' name name' uni fun ann. (tyname → tyname') → (name → name') → Program tyname name uni fun ann → Program tyname' name' uni fun ann Source #

type family UniOf a ∷ TypeType Source #

Extract the universe from a type.

Instances

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

Defined in PlutusCore.Builtin.Polymorphism

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

Defined in PlutusCore.Builtin.Polymorphism

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

Defined in PlutusCore.Evaluation.Machine.Ck

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

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

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

Defined in UntypedPlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

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

data Type tyname uni ann Source #

A Kind assigned to expressions.

Constructors

TyVar ann tyname

Type variable

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

Function type

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

Fix-point type, for constructing self-recursive types

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

Polymorphic type

TyBuiltin ann (SomeTypeIn uni)

Builtin type

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

Type lambda

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

Type application

TySOP ann [[Type tyname uni ann]]

Sum-of-products type

Instances

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name. ToScopedName name ⇒ name → NameAnn) → TyNameType tyname uni NameAnnType tyname uni NameAnn Source #

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

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

prettyByPrettyConfigPlcType tyname uni ann → Doc ann0 Source #

prettyListByPrettyConfigPlc → [Type tyname uni ann] → Doc ann0 Source #

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

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyByPrettyConfigClassic configName → Type tyname uni ann → Doc ann0 Source #

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

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

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyByPrettyConfigReadable configName → Type tyname uni a → Doc ann Source #

prettyListByPrettyConfigReadable configName → [Type tyname uni a] → Doc ann 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 ~ TyNameCollectScopeInfo (Type tyname uni) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

tyname ~ TyNameEstablishScoping (Type tyname uni) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

Methods

establishScopingType tyname uni ann → Quote (Type tyname uni NameAnn) Source #

Generic (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

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

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

showsPrecIntType tyname uni ann → ShowS Source #

showType tyname uni ann → String Source #

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

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

Defined in PlutusCore.Core.Type

Methods

rnfType tyname uni ann → () Source #

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

Defined in PlutusCore.Flat

Methods

encodeType tyname uni ann → Encoding Source #

decodeGet (Type tyname uni ann) Source #

sizeType tyname uni ann → NumBitsNumBits Source #

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

Defined in PlutusCore.Core.Instance.Eq

Methods

(==)Type NamedTyDeBruijn uni ann → Type NamedTyDeBruijn uni ann → Bool Source #

(/=)Type NamedTyDeBruijn uni ann → Type NamedTyDeBruijn uni ann → Bool Source #

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

Defined in PlutusCore.Core.Instance.Eq

Methods

(==)Type TyDeBruijn uni ann → Type TyDeBruijn uni ann → Bool Source #

(/=)Type TyDeBruijn uni ann → Type TyDeBruijn uni ann → Bool Source #

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

Defined in PlutusCore.Core.Instance.Eq

Methods

(==)Type TyName uni ann → Type TyName uni ann → Bool Source #

(/=)Type TyName uni ann → Type TyName uni ann → Bool Source #

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

Defined in PlutusCore.Rename

Methods

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

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

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

prettyType tyname uni ann → Doc ann0 Source #

prettyList ∷ [Type tyname uni ann] → Doc ann0 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.34.0.0-inplace" 'False) (((C1 ('MetaCons "TyVar" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tyname)) :+: C1 ('MetaCons "TyFun" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann))))) :+: (C1 ('MetaCons "TyIFix" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))) :+: C1 ('MetaCons "TyForall" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tyname)) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ann)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))))) :+: ((C1 ('MetaCons "TyBuiltin" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SomeTypeIn uni))) :+: C1 ('MetaCons "TyLam" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tyname)) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ann)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann))))) :+: (C1 ('MetaCons "TyApp" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))) :+: C1 ('MetaCons "TySOP" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [[Type tyname uni ann]])))))
type HasUniques (Type tyname uni ann) 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 Kinds of the given Kind.

typeMapNames ∷ ∀ tyname tyname' uni ann. (tyname → tyname') → Type tyname uni ann → Type tyname' uni ann Source #

data Kind ann Source #

Constructors

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

Instances

Instances details
Functor Kind Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

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

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

CollectScopeInfo Kind Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

EstablishScoping Kind Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

DefaultPrettyPlcStrategy (Kind ann) ⇒ PrettyBy PrettyConfigPlc (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

prettyByPrettyConfigPlcKind ann → Doc ann0 Source #

prettyListByPrettyConfigPlc → [Kind ann] → Doc ann0 Source #

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

Defined in PlutusCore.Core.Type

Methods

liftQuote m ⇒ Kind ann → m Exp Source #

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

Generic (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

type Rep (Kind ann) ∷ TypeType Source #

Methods

fromKind ann → Rep (Kind ann) x Source #

toRep (Kind ann) x → Kind ann Source #

Show ann ⇒ Show (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

showsPrecIntKind ann → ShowS Source #

showKind ann → String Source #

showList ∷ [Kind ann] → ShowS Source #

NFData ann ⇒ NFData (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

rnfKind ann → () Source #

Flat ann ⇒ Flat (Kind ann) Source # 
Instance details

Defined in PlutusCore.Flat

Methods

encodeKind ann → Encoding Source #

decodeGet (Kind ann) Source #

sizeKind ann → NumBitsNumBits Source #

Eq ann ⇒ Eq (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

(==)Kind ann → Kind ann → Bool Source #

(/=)Kind ann → Kind ann → Bool Source #

Hashable ann ⇒ Hashable (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

hashWithSaltIntKind ann → Int Source #

hashKind ann → Int Source #

Pretty ann ⇒ Pretty (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

prettyKind ann → Doc ann0 Source #

prettyList ∷ [Kind ann] → Doc ann0 Source #

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

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyByPrettyConfigClassic configName → Kind ann → Doc ann0 Source #

prettyListByPrettyConfigClassic configName → [Kind ann] → Doc ann0 Source #

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

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyByPrettyConfigReadable configName → Kind a → Doc ann Source #

prettyListByPrettyConfigReadable configName → [Kind a] → Doc ann Source #

type Rep (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type HasUniques (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type HasUniques (Kind ann) = ()

toPatFuncKindKind () → Kind () Source #

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

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

argsFunKindKind ann → [Kind ann] Source #

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

data ParserError Source #

An error encountered during parsing.

Instances

Instances details
Generic ParserError Source # 
Instance details

Defined in PlutusCore.Error

Associated Types

type Rep ParserErrorTypeType Source #

Show ParserError Source # 
Instance details

Defined in PlutusCore.Error

NFData ParserError Source # 
Instance details

Defined in PlutusCore.Error

Methods

rnfParserError → () Source #

Eq ParserError Source # 
Instance details

Defined in PlutusCore.Error

Ord ParserError Source # 
Instance details

Defined in PlutusCore.Error

ShowErrorComponent ParserError Source # 
Instance details

Defined in PlutusCore.Error

Pretty ParserError Source # 
Instance details

Defined in PlutusCore.Error

Methods

prettyParserErrorDoc ann Source #

prettyList ∷ [ParserError] → Doc ann Source #

type Rep ParserError Source # 
Instance details

Defined in PlutusCore.Error

data Version Source #

The version of Plutus Core used by this program.

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

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

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

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

Instances

Instances details
Generic Version Source # 
Instance details

Defined in PlutusCore.Version

Associated Types

type Rep VersionTypeType Source #

Methods

fromVersionRep Version x Source #

toRep Version x → Version Source #

Show Version Source # 
Instance details

Defined in PlutusCore.Version

NFData Version Source # 
Instance details

Defined in PlutusCore.Version

Methods

rnfVersion → () Source #

Flat Version Source # 
Instance details

Defined in PlutusCore.Flat

Eq Version Source # 
Instance details

Defined in PlutusCore.Version

Methods

(==)VersionVersionBool Source #

(/=)VersionVersionBool Source #

Ord Version Source # 
Instance details

Defined in PlutusCore.Version

Hashable Version Source # 
Instance details

Defined in PlutusCore.Version

Methods

hashWithSaltIntVersionInt Source #

hashVersionInt Source #

Pretty Version Source # 
Instance details

Defined in PlutusCore.Version

Methods

prettyVersionDoc ann Source #

prettyList ∷ [Version] → Doc ann Source #

type Rep Version Source # 
Instance details

Defined in PlutusCore.Version

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

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

prettyByPrettyConfigPlcProgram tyname name uni fun ann → Doc ann0 Source #

prettyListByPrettyConfigPlc → [Program tyname name uni fun ann] → Doc ann0 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

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

prettyListByPrettyConfigClassic configName → [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

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

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

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

Defined in PlutusCore.Core.Type

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

collectScopeInfoProgram tyname name uni fun NameAnnScopeErrorOrInfo Source #

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

establishScopingProgram tyname name uni fun ann → Quote (Program tyname name uni fun NameAnn) Source #

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

Defined in PlutusCore.Core.Type

Associated Types

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

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

showsPrecIntProgram tyname name uni fun ann → ShowS Source #

showProgram tyname name uni fun ann → String Source #

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

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

Defined in PlutusCore.Core.Type

Methods

rnfProgram 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

encodeProgram tyname name uni fun ann → Encoding Source #

decodeGet (Program tyname name uni fun ann) Source #

sizeProgram tyname name uni fun ann → NumBitsNumBits 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 #

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

Defined in PlutusCore.Rename

Methods

renameMonadQuote m ⇒ Program tyname name uni fun ann → m (Program tyname name uni fun ann) Source #

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

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

prettyProgram tyname name uni fun ann → Doc ann0 Source #

prettyList ∷ [Program tyname name uni fun ann] → Doc ann0 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.34.0.0-inplace" 'False) (C1 ('MetaCons "Program" 'PrefixI 'True) (S1 ('MetaSel ('Just "_progAnn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Just "_progVer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version) :*: S1 ('MetaSel ('Just "_progTerm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)))))
type HasUniques (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

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

data Name Source #

A Name represents variables/names in Plutus Core.

Constructors

Name 

Fields

Instances

Instances details
Generic Name Source # 
Instance details

Defined in PlutusCore.Name.Unique

Associated Types

type Rep NameTypeType Source #

Methods

fromNameRep Name x Source #

toRep Name x → Name Source #

Show Name Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

showsPrecIntNameShowS Source #

showNameString Source #

showList ∷ [Name] → ShowS Source #

NFData Name Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

rnfName → () Source #

Flat Name Source # 
Instance details

Defined in PlutusCore.Flat

Eq Name Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

(==)NameNameBool Source #

(/=)NameNameBool Source #

Ord Name Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

compareNameNameOrdering Source #

(<)NameNameBool Source #

(<=)NameNameBool Source #

(>)NameNameBool Source #

(>=)NameNameBool Source #

maxNameNameName Source #

minNameNameName Source #

Hashable Name Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

hashWithSaltIntNameInt Source #

hashNameInt Source #

ToScopedName Name Source # 
Instance details

Defined in PlutusCore.Check.Scoping

HasText Name Source # 
Instance details

Defined in PlutusCore.Name.Unique

Pretty Name Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

prettyNameDoc ann Source #

prettyList ∷ [Name] → Doc ann Source #

HasUnique Name TermUnique Source # 
Instance details

Defined in PlutusCore.Name.Unique

HasPrettyConfigName config ⇒ PrettyBy config Name Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

prettyBy ∷ config → NameDoc ann Source #

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

Lift Name Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

liftQuote m ⇒ Name → m Exp Source #

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

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

Methods

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

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

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

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

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

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

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

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

(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

Methods

(==)Term Name uni fun ann → Term Name uni fun ann → Bool Source #

(/=)Term Name uni fun ann → Term Name uni fun ann → Bool Source #

HashableTermConstraints uni fun ann ⇒ Hashable (Term Name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Eq

Methods

hashWithSaltIntTerm Name uni fun ann → Int Source #

hashTerm Name uni fun ann → Int Source #

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

Defined in PlutusCore.Core.Instance.Eq

Methods

(==)Term TyName Name uni fun ann → Term TyName Name uni fun ann → Bool Source #

(/=)Term TyName Name uni fun ann → Term TyName Name uni fun ann → Bool Source #

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

Defined in PlutusCore.Builtin.HasConstant

Methods

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

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

type Rep Name Source # 
Instance details

Defined in PlutusCore.Name.Unique

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

newtype TyName Source #

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

Constructors

TyName 

Fields

Instances

Instances details
Generic TyName Source # 
Instance details

Defined in PlutusCore.Name.Unique

Associated Types

type Rep TyNameTypeType Source #

Methods

fromTyNameRep TyName x Source #

toRep TyName x → TyName Source #

Show TyName Source # 
Instance details

Defined in PlutusCore.Name.Unique

NFData TyName Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

rnfTyName → () Source #

Flat TyName Source # 
Instance details

Defined in PlutusCore.Flat

Eq TyName Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

(==)TyNameTyNameBool Source #

(/=)TyNameTyNameBool Source #

Ord TyName Source # 
Instance details

Defined in PlutusCore.Name.Unique

Hashable TyName Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

hashWithSaltIntTyNameInt Source #

hashTyNameInt Source #

Wrapped TyName Source # 
Instance details

Defined in PlutusCore.Name.Unique

Associated Types

type Unwrapped TyName

Methods

_Wrapped' ∷ Iso' TyName (Unwrapped TyName)

ToScopedName TyName Source # 
Instance details

Defined in PlutusCore.Check.Scoping

HasText TyName Source # 
Instance details

Defined in PlutusCore.Name.Unique

Pretty TyName Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

prettyTyNameDoc ann Source #

prettyList ∷ [TyName] → Doc ann Source #

HasUnique TyName TypeUnique Source # 
Instance details

Defined in PlutusCore.Name.Unique

HasPrettyConfigName config ⇒ PrettyBy config TyName Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

prettyBy ∷ config → TyNameDoc ann Source #

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

Lift TyName Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

liftQuote m ⇒ TyName → m Exp Source #

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

tyname ~ TyNameReference TyName (Type tyname uni) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Scoping

Methods

referenceVia ∷ (∀ name. ToScopedName name ⇒ name → NameAnn) → TyNameType tyname uni NameAnnType tyname uni NameAnn Source #

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

Methods

(==)Type TyName uni ann → Type TyName uni ann → Bool Source #

(/=)Type TyName uni ann → Type TyName uni ann → Bool Source #

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 → TyNameKind 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 #

constr ∷ ann → Type TyName uni ann → Word64 → [Term name uni fun ann] → Term name uni fun ann Source #

kase ∷ ann → Type TyName uni ann → Term name uni fun ann → [Term name uni fun ann] → Term name uni fun ann Source #

termLet ∷ ann → TermDef (Term name uni fun) TyName name uni 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

Methods

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

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

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

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

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

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

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

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

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

Defined in PlutusCore.Core.Instance.Eq

Methods

(==)Term TyName Name uni fun ann → Term TyName Name uni fun ann → Bool Source #

(/=)Term TyName Name uni fun ann → Term TyName Name uni fun ann → Bool Source #

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

Defined in PlutusCore.Builtin.HasConstant

Methods

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

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

type Rep TyName Source # 
Instance details

Defined in PlutusCore.Name.Unique

type Rep TyName = D1 ('MetaData "TyName" "PlutusCore.Name.Unique" "plutus-core-1.34.0.0-inplace" '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.Unique

type Unwrapped TyName = GUnwrapped (Rep TyName)

newtype Unique Source #

A unique identifier

Constructors

Unique 

Fields

Instances

Instances details
Enum Unique Source # 
Instance details

Defined in PlutusCore.Name.Unique

Show Unique Source # 
Instance details

Defined in PlutusCore.Name.Unique

NFData Unique Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

rnfUnique → () Source #

Flat Unique Source # 
Instance details

Defined in PlutusCore.Flat

Eq Unique Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

(==)UniqueUniqueBool Source #

(/=)UniqueUniqueBool Source #

Ord Unique Source # 
Instance details

Defined in PlutusCore.Name.Unique

Hashable Unique Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

hashWithSaltIntUniqueInt Source #

hashUniqueInt Source #

Pretty Unique Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

prettyUniqueDoc ann Source #

prettyList ∷ [Unique] → Doc ann Source #

HasUnique Unique Unique Source # 
Instance details

Defined in PlutusCore.Name.Unique

Lift Unique Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

liftQuote m ⇒ Unique → m Exp Source #

liftTyped ∷ ∀ (m ∷ TypeType). Quote m ⇒ UniqueCode m Unique Source #

newtype UniqueMap unique a Source #

A mapping from Uniques to arbitrary values of type a. Since Unique is equivalent to Int (see PlutusCore.Name.Unique), we can use an IntMap representation for this type.

Constructors

UniqueMap 

Fields

Instances

Instances details
Foldable (UniqueMap unique) Source # 
Instance details

Defined in PlutusCore.Name.UniqueMap

Methods

foldMonoid m ⇒ UniqueMap unique m → m Source #

foldMapMonoid m ⇒ (a → m) → UniqueMap unique a → m Source #

foldMap'Monoid m ⇒ (a → m) → UniqueMap unique a → m Source #

foldr ∷ (a → b → b) → b → UniqueMap unique a → b Source #

foldr' ∷ (a → b → b) → b → UniqueMap unique a → b Source #

foldl ∷ (b → a → b) → b → UniqueMap unique a → b Source #

foldl' ∷ (b → a → b) → b → UniqueMap unique a → b Source #

foldr1 ∷ (a → a → a) → UniqueMap unique a → a Source #

foldl1 ∷ (a → a → a) → UniqueMap unique a → a Source #

toListUniqueMap unique a → [a] Source #

nullUniqueMap unique a → Bool Source #

lengthUniqueMap unique a → Int Source #

elemEq a ⇒ a → UniqueMap unique a → Bool Source #

maximumOrd a ⇒ UniqueMap unique a → a Source #

minimumOrd a ⇒ UniqueMap unique a → a Source #

sumNum a ⇒ UniqueMap unique a → a Source #

productNum a ⇒ UniqueMap unique a → a Source #

Functor (UniqueMap unique) Source # 
Instance details

Defined in PlutusCore.Name.UniqueMap

Methods

fmap ∷ (a → b) → UniqueMap unique a → UniqueMap unique b Source #

(<$) ∷ a → UniqueMap unique b → UniqueMap unique a Source #

Monoid (UniqueMap unique a) Source # 
Instance details

Defined in PlutusCore.Name.UniqueMap

Methods

memptyUniqueMap unique a Source #

mappendUniqueMap unique a → UniqueMap unique a → UniqueMap unique a Source #

mconcat ∷ [UniqueMap unique a] → UniqueMap unique a Source #

Semigroup (UniqueMap unique a) Source # 
Instance details

Defined in PlutusCore.Name.UniqueMap

Methods

(<>)UniqueMap unique a → UniqueMap unique a → UniqueMap unique a Source #

sconcatNonEmpty (UniqueMap unique a) → UniqueMap unique a Source #

stimesIntegral b ⇒ b → UniqueMap unique a → UniqueMap unique a Source #

Show a ⇒ Show (UniqueMap unique a) Source # 
Instance details

Defined in PlutusCore.Name.UniqueMap

Methods

showsPrecIntUniqueMap unique a → ShowS Source #

showUniqueMap unique a → String Source #

showList ∷ [UniqueMap unique a] → ShowS Source #

Eq a ⇒ Eq (UniqueMap unique a) Source # 
Instance details

Defined in PlutusCore.Name.UniqueMap

Methods

(==)UniqueMap unique a → UniqueMap unique a → Bool Source #

(/=)UniqueMap unique a → UniqueMap unique a → Bool Source #

newtype UniqueSet unique Source #

A set containing Uniques. Since Unique is equivalent to Int (see PlutusCore.Name.Unique), we can use an IntSet representation for this type.

Constructors

UniqueSet 

Fields

Instances

Instances details
Monoid (UniqueSet unique) Source # 
Instance details

Defined in PlutusCore.Name.UniqueSet

Methods

memptyUniqueSet unique Source #

mappendUniqueSet unique → UniqueSet unique → UniqueSet unique Source #

mconcat ∷ [UniqueSet unique] → UniqueSet unique Source #

Semigroup (UniqueSet unique) Source # 
Instance details

Defined in PlutusCore.Name.UniqueSet

Methods

(<>)UniqueSet unique → UniqueSet unique → UniqueSet unique Source #

sconcatNonEmpty (UniqueSet unique) → UniqueSet unique Source #

stimesIntegral b ⇒ b → UniqueSet unique → UniqueSet unique Source #

Show (UniqueSet unique) Source # 
Instance details

Defined in PlutusCore.Name.UniqueSet

Methods

showsPrecIntUniqueSet unique → ShowS Source #

showUniqueSet unique → String Source #

showList ∷ [UniqueSet unique] → ShowS Source #

Eq (UniqueSet unique) Source # 
Instance details

Defined in PlutusCore.Name.UniqueSet

Methods

(==)UniqueSet unique → UniqueSet unique → Bool Source #

(/=)UniqueSet unique → UniqueSet unique → Bool Source #

newtype Normalized a Source #

Constructors

Normalized 

Fields

Instances

Instances details
Foldable Normalized Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

foldMonoid m ⇒ Normalized m → m Source #

foldMapMonoid m ⇒ (a → m) → Normalized a → m Source #

foldMap'Monoid m ⇒ (a → m) → Normalized a → m Source #

foldr ∷ (a → b → b) → b → Normalized a → b Source #

foldr' ∷ (a → b → b) → b → Normalized a → b Source #

foldl ∷ (b → a → b) → b → Normalized a → b Source #

foldl' ∷ (b → a → b) → b → Normalized a → b Source #

foldr1 ∷ (a → a → a) → Normalized a → a Source #

foldl1 ∷ (a → a → a) → Normalized a → a Source #

toListNormalized a → [a] Source #

nullNormalized a → Bool Source #

lengthNormalized a → Int Source #

elemEq a ⇒ a → Normalized a → Bool Source #

maximumOrd a ⇒ Normalized a → a Source #

minimumOrd a ⇒ Normalized a → a Source #

sumNum a ⇒ Normalized a → a Source #

productNum a ⇒ Normalized a → a Source #

Traversable Normalized Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

traverseApplicative f ⇒ (a → f b) → Normalized a → f (Normalized b) Source #

sequenceAApplicative f ⇒ Normalized (f a) → f (Normalized a) Source #

mapMMonad m ⇒ (a → m b) → Normalized a → m (Normalized b) Source #

sequenceMonad m ⇒ Normalized (m a) → m (Normalized a) Source #

Applicative Normalized Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

pure ∷ a → Normalized a Source #

(<*>)Normalized (a → b) → Normalized a → Normalized b Source #

liftA2 ∷ (a → b → c) → Normalized a → Normalized b → Normalized c Source #

(*>)Normalized a → Normalized b → Normalized b Source #

(<*)Normalized a → Normalized b → Normalized a Source #

Functor Normalized Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

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

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

PrettyBy config a ⇒ PrettyBy config (Normalized a) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

prettyBy ∷ config → Normalized a → Doc ann Source #

prettyListBy ∷ config → [Normalized a] → Doc ann Source #

Generic (Normalized a) Source # 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

type Rep (Normalized a) ∷ TypeType Source #

Methods

fromNormalized a → Rep (Normalized a) x Source #

toRep (Normalized a) x → Normalized a Source #

Show a ⇒ Show (Normalized a) Source # 
Instance details

Defined in PlutusCore.Core.Type

NFData a ⇒ NFData (Normalized a) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

rnfNormalized a → () Source #

Flat a ⇒ Flat (Normalized a) Source # 
Instance details

Defined in PlutusCore.Flat

Eq a ⇒ Eq (Normalized a) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

(==)Normalized a → Normalized a → Bool Source #

(/=)Normalized a → Normalized a → Bool Source #

Rename a ⇒ Rename (Normalized a) Source # 
Instance details

Defined in PlutusCore.Rename

Methods

renameMonadQuote m ⇒ Normalized a → m (Normalized a) Source #

Pretty a ⇒ Pretty (Normalized a) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

prettyNormalized a → Doc ann Source #

prettyList ∷ [Normalized a] → Doc ann Source #

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.34.0.0-inplace" 'True) (C1 ('MetaCons "Normalized" 'PrefixI 'True) (S1 ('MetaSel ('Just "unNormalized") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

latestVersionVersion Source #

The latest version of Plutus Core supported by this library.

termAnnTerm tyname name uni fun ann → ann Source #

typeAnnType tyname uni ann → ann Source #

tyVarDeclAnn ∷ ∀ tyname ann. Lens' (TyVarDecl tyname ann) ann Source #

tyVarDeclName ∷ ∀ tyname ann tyname. Lens (TyVarDecl tyname ann) (TyVarDecl tyname ann) tyname tyname Source #

tyVarDeclKind ∷ ∀ tyname ann. Lens' (TyVarDecl tyname ann) (Kind ann) Source #

varDeclAnn ∷ ∀ tyname name uni ann. Lens' (VarDecl tyname name uni ann) ann Source #

varDeclName ∷ ∀ tyname name uni ann name. Lens (VarDecl tyname name uni ann) (VarDecl tyname name uni ann) name name Source #

varDeclType ∷ ∀ tyname name uni ann tyname uni. Lens (VarDecl tyname name uni ann) (VarDecl tyname name uni ann) (Type tyname uni ann) (Type tyname uni ann) Source #

tyDeclAnn ∷ ∀ tyname uni ann. Lens' (TyDecl tyname uni ann) ann Source #

tyDeclType ∷ ∀ tyname uni ann tyname uni. Lens (TyDecl tyname uni ann) (TyDecl tyname uni ann) (Type tyname uni ann) (Type tyname uni ann) Source #

tyDeclKind ∷ ∀ tyname uni ann. Lens' (TyDecl tyname uni ann) (Kind ann) Source #

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

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

progTerm ∷ ∀ tyname name uni fun ann tyname name uni fun. Lens (Program tyname name uni fun ann) (Program tyname name uni fun ann) (Term tyname name uni fun ann) (Term tyname name uni fun ann) Source #

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.

DeBruijn representation

newtype DeBruijn Source #

A term name as a de Bruijn index, without the name string.

Constructors

DeBruijn 

Fields

Instances

Instances details
Generic DeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Associated Types

type Rep DeBruijnTypeType Source #

Show DeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

NFData DeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

rnfDeBruijn → () Source #

Flat DeBruijn Source # 
Instance details

Defined in PlutusCore.Flat

Eq DeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Hashable DeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

HasIndex DeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

HasPrettyConfigName config ⇒ PrettyBy config DeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

prettyBy ∷ config → DeBruijnDoc ann Source #

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

Flat (Binder DeBruijn) Source # 
Instance details

Defined in PlutusCore.Flat

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

Defined in UntypedPlutusCore.Core.Instance.Eq

Methods

(==)Term DeBruijn uni fun ann → Term DeBruijn uni fun ann → Bool Source #

(/=)Term DeBruijn uni fun ann → Term DeBruijn uni fun ann → Bool Source #

HashableTermConstraints uni fun ann ⇒ Hashable (Term DeBruijn uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Eq

Methods

hashWithSaltIntTerm DeBruijn uni fun ann → Int Source #

hashTerm DeBruijn uni fun ann → Int Source #

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

Defined in PlutusCore.Core.Instance.Eq

Methods

(==)Term TyDeBruijn DeBruijn uni fun ann → Term TyDeBruijn DeBruijn uni fun ann → Bool Source #

(/=)Term TyDeBruijn DeBruijn uni fun ann → Term TyDeBruijn DeBruijn uni fun ann → Bool Source #

type Rep DeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

type Rep DeBruijn = D1 ('MetaData "DeBruijn" "PlutusCore.DeBruijn.Internal" "plutus-core-1.34.0.0-inplace" 'True) (C1 ('MetaCons "DeBruijn" 'PrefixI 'True) (S1 ('MetaSel ('Just "dbnIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Index)))

newtype TyDeBruijn Source #

A type name as a de Bruijn index, without the name string.

Constructors

TyDeBruijn DeBruijn 

Instances

Instances details
Generic TyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Associated Types

type Rep TyDeBruijnTypeType Source #

Show TyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

NFData TyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

rnfTyDeBruijn → () Source #

Flat TyDeBruijn Source # 
Instance details

Defined in PlutusCore.Flat

Eq TyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Wrapped TyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Associated Types

type Unwrapped TyDeBruijn

Methods

_Wrapped' ∷ Iso' TyDeBruijn (Unwrapped TyDeBruijn)

HasIndex TyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

HasPrettyConfigName config ⇒ PrettyBy config TyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

prettyBy ∷ config → TyDeBruijnDoc ann Source #

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

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

Defined in PlutusCore.Core.Instance.Eq

Methods

(==)Type TyDeBruijn uni ann → Type TyDeBruijn uni ann → Bool Source #

(/=)Type TyDeBruijn uni ann → Type TyDeBruijn uni ann → Bool Source #

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

Defined in PlutusCore.Core.Instance.Eq

Methods

(==)Term TyDeBruijn DeBruijn uni fun ann → Term TyDeBruijn DeBruijn uni fun ann → Bool Source #

(/=)Term TyDeBruijn DeBruijn uni fun ann → Term TyDeBruijn DeBruijn uni fun ann → Bool Source #

type Rep TyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

type Rep TyDeBruijn = D1 ('MetaData "TyDeBruijn" "PlutusCore.DeBruijn.Internal" "plutus-core-1.34.0.0-inplace" 'True) (C1 ('MetaCons "TyDeBruijn" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DeBruijn)))
type Unwrapped TyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

type Unwrapped TyDeBruijn = GUnwrapped (Rep TyDeBruijn)

data NamedDeBruijn Source #

A term name as a de Bruijn index.

Constructors

NamedDeBruijn 

Fields

Instances

Instances details
Generic NamedDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Associated Types

type Rep NamedDeBruijnTypeType Source #

Read NamedDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Show NamedDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

NFData NamedDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

rnfNamedDeBruijn → () Source #

Flat NamedDeBruijn Source # 
Instance details

Defined in PlutusCore.Flat

Eq NamedDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Hashable NamedDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

HasIndex NamedDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

HasPrettyConfigName config ⇒ PrettyBy config NamedDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

prettyBy ∷ config → NamedDeBruijnDoc ann Source #

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

Flat (Binder NamedDeBruijn) Source # 
Instance details

Defined in PlutusCore.Flat

ThrowableBuiltins uni fun ⇒ MonadError (CekEvaluationException NamedDeBruijn uni fun) (CekM uni fun s) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

throwErrorCekEvaluationException NamedDeBruijn uni fun → CekM uni fun s a Source #

catchErrorCekM uni fun s a → (CekEvaluationException NamedDeBruijn uni fun → CekM uni fun s a) → CekM uni fun s a Source #

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

Defined in UntypedPlutusCore.Core.Instance.Eq

Methods

(==)Term NamedDeBruijn uni fun ann → Term NamedDeBruijn uni fun ann → Bool Source #

(/=)Term NamedDeBruijn uni fun ann → Term NamedDeBruijn uni fun ann → Bool Source #

HashableTermConstraints uni fun ann ⇒ Hashable (Term NamedDeBruijn uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Eq

Methods

hashWithSaltIntTerm NamedDeBruijn uni fun ann → Int Source #

hashTerm NamedDeBruijn uni fun ann → Int Source #

(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

type Rep NamedDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

type Rep NamedDeBruijn = D1 ('MetaData "NamedDeBruijn" "PlutusCore.DeBruijn.Internal" "plutus-core-1.34.0.0-inplace" 'False) (C1 ('MetaCons "NamedDeBruijn" 'PrefixI 'True) (S1 ('MetaSel ('Just "ndbnString") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "ndbnIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Index)))

newtype NamedTyDeBruijn Source #

A type name as a de Bruijn index.

Instances

Instances details
Generic NamedTyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Associated Types

type Rep NamedTyDeBruijnTypeType Source #

Show NamedTyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

NFData NamedTyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

rnfNamedTyDeBruijn → () Source #

Flat NamedTyDeBruijn Source # 
Instance details

Defined in PlutusCore.Flat

Eq NamedTyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Wrapped NamedTyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Associated Types

type Unwrapped NamedTyDeBruijn

Methods

_Wrapped' ∷ Iso' NamedTyDeBruijn (Unwrapped NamedTyDeBruijn)

HasIndex NamedTyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

HasPrettyConfigName config ⇒ PrettyBy config NamedTyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

prettyBy ∷ config → NamedTyDeBruijnDoc ann Source #

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

Flat (Binder NamedTyDeBruijn) Source # 
Instance details

Defined in PlutusCore.Flat

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

Defined in PlutusCore.Core.Instance.Eq

Methods

(==)Type NamedTyDeBruijn uni ann → Type NamedTyDeBruijn uni ann → Bool Source #

(/=)Type NamedTyDeBruijn uni ann → Type NamedTyDeBruijn uni ann → Bool Source #

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

Defined in PlutusCore.Core.Instance.Eq

type Rep NamedTyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

type Rep NamedTyDeBruijn = D1 ('MetaData "NamedTyDeBruijn" "PlutusCore.DeBruijn.Internal" "plutus-core-1.34.0.0-inplace" 'True) (C1 ('MetaCons "NamedTyDeBruijn" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NamedDeBruijn)))
type Unwrapped NamedTyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

type Unwrapped NamedTyDeBruijn = GUnwrapped (Rep NamedTyDeBruijn)

deBruijnTerm ∷ (AsFreeVariableError e, MonadError e m) ⇒ Term TyName Name uni fun ann → m (Term NamedTyDeBruijn NamedDeBruijn uni fun ann) Source #

Convert a Term with TyNames and Names into a Term with NamedTyDeBruijns and NamedDeBruijns. Will throw an error if a free variable is encountered.

unDeBruijnTerm ∷ (MonadQuote m, AsFreeVariableError e, MonadError e m) ⇒ Term NamedTyDeBruijn NamedDeBruijn uni fun ann → m (Term TyName Name uni fun ann) Source #

Convert a Term with NamedTyDeBruijns and NamedDeBruijns into a Term with TyNames and Names. Will throw an error if a free variable is encountered.

Processing

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)

class Rename a where Source #

The class of things that can be renamed. I.e. things that are capable of satisfying the global uniqueness condition.

Methods

renameMonadQuote m ⇒ a → m a Source #

Rename Uniques so that they're globally unique. In case there are any free variables, they must be left untouched and bound variables must not get renamed to free ones. Must always assign new names to bound variables, so that rename can be used for alpha-renaming as well.

Instances

Instances details
Rename a ⇒ Rename (Normalized a) Source # 
Instance details

Defined in PlutusCore.Rename

Methods

renameMonadQuote m ⇒ Normalized a → m (Normalized a) Source #

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

Defined in PlutusCore.Rename

Methods

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

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

Defined in UntypedPlutusCore.Rename

Methods

renameMonadQuote m ⇒ Program name uni fun ann → m (Program name uni fun ann) Source #

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

Defined in UntypedPlutusCore.Rename

Methods

renameMonadQuote m ⇒ Term name uni fun ann → m (Term name uni fun ann) Source #

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

Defined in PlutusCore.Rename

Methods

renameMonadQuote m ⇒ Program tyname name uni fun ann → m (Program 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

renameMonadQuote m ⇒ Term tyname name uni fun ann → m (Term tyname name uni fun ann) Source #

Type checking

normalizeTypesIn ∷ (HasUnique tyname TypeUnique, HasUnique name TermUnique, MonadNormalizeType uni m) ⇒ Term tyname name uni fun ann → m (Term tyname name uni fun ann) Source #

Normalize every Kind in a Term.

normalizeTypesInProgram ∷ (HasUnique tyname TypeUnique, HasUnique name TermUnique, MonadNormalizeType uni m) ⇒ Program tyname name uni fun ann → m (Program tyname name uni fun ann) Source #

Normalize every Kind in a Program.

class AsTypeError r term uni fun ann | r → term uni fun ann where Source #

Minimal complete definition

_TypeError

Methods

_TypeError ∷ Prism' r (TypeError term uni fun ann) Source #

_KindMismatch ∷ Prism' r (ann, Type TyName uni (), ExpectedShapeOr (Kind ()), Kind ()) Source #

_TypeMismatch ∷ Prism' r (ann, term, ExpectedShapeOr (Type TyName uni ()), Normalized (Type TyName uni ())) Source #

_TyNameMismatch ∷ Prism' r (ann, TyName, TyName) Source #

_NameMismatch ∷ Prism' r (ann, Name, Name) Source #

_FreeTypeVariableE ∷ Prism' r (ann, TyName) Source #

_FreeVariableE ∷ Prism' r (ann, Name) Source #

_UnknownBuiltinFunctionE ∷ Prism' r (ann, fun) Source #

Instances

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

Defined in PlutusCore.Error

Methods

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

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

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

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

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

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

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

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

AsTypeError (TypeError term uni fun ann) term uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_TypeError ∷ Prism' (TypeError term uni fun ann) (TypeError term uni fun ann) Source #

_KindMismatch ∷ Prism' (TypeError term uni fun ann) (ann, Type TyName uni (), ExpectedShapeOr (Kind ()), Kind ()) Source #

_TypeMismatch ∷ Prism' (TypeError term uni fun ann) (ann, term, ExpectedShapeOr (Type TyName uni ()), Normalized (Type TyName uni ())) Source #

_TyNameMismatch ∷ Prism' (TypeError term uni fun ann) (ann, TyName, TyName) Source #

_NameMismatch ∷ Prism' (TypeError term uni fun ann) (ann, Name, Name) Source #

_FreeTypeVariableE ∷ Prism' (TypeError term uni fun ann) (ann, TyName) Source #

_FreeVariableE ∷ Prism' (TypeError term uni fun ann) (ann, Name) Source #

_UnknownBuiltinFunctionE ∷ Prism' (TypeError term uni fun ann) (ann, fun) Source #

data TypeError term uni fun ann Source #

Instances

Instances details
(Pretty term, PrettyUni uni, Pretty fun, Pretty ann) ⇒ PrettyBy PrettyConfigPlc (TypeError term uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

prettyByPrettyConfigPlcTypeError term uni fun ann → Doc ann0 Source #

prettyListByPrettyConfigPlc → [TypeError term uni fun ann] → Doc ann0 Source #

Functor (TypeError term uni fun) Source # 
Instance details

Defined in PlutusCore.Error

Methods

fmap ∷ (a → b) → TypeError term uni fun a → TypeError term uni fun b Source #

(<$) ∷ a → TypeError term uni fun b → TypeError term uni fun a Source #

Generic (TypeError term uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Associated Types

type Rep (TypeError term uni fun ann) ∷ TypeType Source #

Methods

fromTypeError term uni fun ann → Rep (TypeError term uni fun ann) x Source #

toRep (TypeError term uni fun ann) x → TypeError term uni fun ann Source #

(GShow uni, Show term, Show ann, Show fun) ⇒ Show (TypeError term uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

showsPrecIntTypeError term uni fun ann → ShowS Source #

showTypeError term uni fun ann → String Source #

showList ∷ [TypeError term uni fun ann] → ShowS Source #

(Closed uni, NFData ann, NFData term, NFData fun) ⇒ NFData (TypeError term uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

rnfTypeError term uni fun ann → () Source #

(GEq uni, Eq term, Eq ann, Eq fun) ⇒ Eq (TypeError term uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

(==)TypeError term uni fun ann → TypeError term uni fun ann → Bool Source #

(/=)TypeError term uni fun ann → TypeError term uni fun ann → Bool Source #

AsTypeError (TypeError term uni fun ann) term uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_TypeError ∷ Prism' (TypeError term uni fun ann) (TypeError term uni fun ann) Source #

_KindMismatch ∷ Prism' (TypeError term uni fun ann) (ann, Type TyName uni (), ExpectedShapeOr (Kind ()), Kind ()) Source #

_TypeMismatch ∷ Prism' (TypeError term uni fun ann) (ann, term, ExpectedShapeOr (Type TyName uni ()), Normalized (Type TyName uni ())) Source #

_TyNameMismatch ∷ Prism' (TypeError term uni fun ann) (ann, TyName, TyName) Source #

_NameMismatch ∷ Prism' (TypeError term uni fun ann) (ann, Name, Name) Source #

_FreeTypeVariableE ∷ Prism' (TypeError term uni fun ann) (ann, TyName) Source #

_FreeVariableE ∷ Prism' (TypeError term uni fun ann) (ann, Name) Source #

_UnknownBuiltinFunctionE ∷ Prism' (TypeError term uni fun ann) (ann, fun) Source #

type Rep (TypeError term uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

type Rep (TypeError term uni fun ann) = D1 ('MetaData "TypeError" "PlutusCore.Error" "plutus-core-1.34.0.0-inplace" 'False) ((C1 ('MetaCons "KindMismatch" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Type TyName uni ()))) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ExpectedShapeOr (Kind ()))) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Kind ())))) :+: (C1 ('MetaCons "TypeMismatch" 'PrefixI 'False) ((S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 term)) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ExpectedShapeOr (Type TyName uni ()))) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Normalized (Type TyName uni ()))))) :+: C1 ('MetaCons "TyNameMismatch" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ann) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyName) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyName))))) :+: ((C1 ('MetaCons "NameMismatch" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ann) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name))) :+: C1 ('MetaCons "FreeTypeVariableE" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyName))) :+: (C1 ('MetaCons "FreeVariableE" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "UnknownBuiltinFunctionE" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ann) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 fun)))))

Errors

data Error uni fun ann Source #

Instances

Instances details
(PrettyUni uni, Pretty fun, Pretty ann) ⇒ PrettyBy PrettyConfigPlc (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

prettyByPrettyConfigPlcError uni fun ann → Doc ann0 Source #

prettyListByPrettyConfigPlc → [Error uni fun ann] → Doc ann0 Source #

Functor (Error uni fun) Source # 
Instance details

Defined in PlutusCore.Error

Methods

fmap ∷ (a → b) → Error uni fun a → Error uni fun b Source #

(<$) ∷ a → Error uni fun b → Error uni fun a Source #

Generic (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Associated Types

type Rep (Error uni fun ann) ∷ TypeType Source #

Methods

fromError uni fun ann → Rep (Error uni fun ann) x Source #

toRep (Error uni fun ann) x → Error uni fun ann Source #

(Show fun, Show ann, Closed uni, Everywhere uni Show, GShow uni, Show ParserError) ⇒ Show (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

showsPrecIntError uni fun ann → ShowS Source #

showError uni fun ann → String Source #

showList ∷ [Error uni fun ann] → ShowS Source #

(NFData fun, NFData ann, Closed uni, Everywhere uni NFData, NFData ParserError) ⇒ NFData (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

rnfError uni fun ann → () Source #

(Eq fun, Eq ann, Closed uni, Everywhere uni Eq, GEq uni, Eq ParserError) ⇒ Eq (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

(==)Error uni fun ann → Error uni fun ann → Bool Source #

(/=)Error uni fun ann → Error uni fun ann → Bool Source #

AsFreeVariableError (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

_FreeVariableError ∷ Prism' (Error uni fun ann) FreeVariableError Source #

_FreeUnique ∷ Prism' (Error uni fun ann) Unique Source #

_FreeIndex ∷ Prism' (Error uni fun ann) Index Source #

AsParserErrorBundle (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

_ParserErrorBundle ∷ Prism' (Error uni fun ann) ParserErrorBundle Source #

_ParseErrorB ∷ Prism' (Error uni fun ann) (ParseErrorBundle Text ParserError) Source #

AsUniqueError (Error uni fun ann) ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_UniqueError ∷ Prism' (Error uni fun ann) (UniqueError ann) Source #

_MultiplyDefined ∷ Prism' (Error uni fun ann) (Unique, ann, ann) Source #

_IncoherentUsage ∷ Prism' (Error uni fun ann) (Unique, ann, ann) Source #

_FreeVariable ∷ Prism' (Error uni fun ann) (Unique, ann) Source #

AsError (Error uni fun ann) uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_Error ∷ Prism' (Error uni fun ann) (Error uni fun ann) Source #

_ParseErrorE ∷ Prism' (Error uni fun ann) ParserErrorBundle Source #

_UniqueCoherencyErrorE ∷ Prism' (Error uni fun ann) (UniqueError ann) Source #

_TypeErrorE ∷ Prism' (Error uni fun ann) (TypeError (Term TyName Name uni fun ()) uni fun ann) Source #

_NormCheckErrorE ∷ Prism' (Error uni fun ann) (NormCheckError TyName Name uni fun ann) Source #

_FreeVariableErrorE ∷ Prism' (Error uni fun ann) FreeVariableError Source #

(tyname ~ TyName, name ~ Name) ⇒ AsNormCheckError (Error uni fun ann) tyname name uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_NormCheckError ∷ Prism' (Error uni fun ann) (NormCheckError tyname name uni fun ann) Source #

_BadType ∷ Prism' (Error uni fun ann) (ann, Type tyname uni ann, Text) Source #

_BadTerm ∷ Prism' (Error uni fun ann) (ann, Term tyname name uni fun ann, Text) Source #

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

Defined in PlutusCore.Error

Methods

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

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

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

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

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

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

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

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

type Rep (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

type Rep (Error uni fun ann) = D1 ('MetaData "Error" "PlutusCore.Error" "plutus-core-1.34.0.0-inplace" 'False) ((C1 ('MetaCons "ParseErrorE" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ParserErrorBundle)) :+: C1 ('MetaCons "UniqueCoherencyErrorE" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (UniqueError ann)))) :+: (C1 ('MetaCons "TypeErrorE" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (TypeError (Term TyName Name uni fun ()) uni fun ann))) :+: (C1 ('MetaCons "NormCheckErrorE" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NormCheckError TyName Name uni fun ann))) :+: C1 ('MetaCons "FreeVariableErrorE" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FreeVariableError)))))

class AsError r uni fun ann | r → uni fun ann where Source #

Minimal complete definition

_Error

Methods

_Error ∷ Prism' r (Error uni fun ann) Source #

_ParseErrorE ∷ Prism' r ParserErrorBundle Source #

_UniqueCoherencyErrorE ∷ Prism' r (UniqueError ann) Source #

_TypeErrorE ∷ Prism' r (TypeError (Term TyName Name uni fun ()) uni fun ann) Source #

_NormCheckErrorE ∷ Prism' r (NormCheckError TyName Name uni fun ann) Source #

_FreeVariableErrorE ∷ Prism' r FreeVariableError Source #

Instances

Instances details
AsError (Error uni fun ann) uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_Error ∷ Prism' (Error uni fun ann) (Error uni fun ann) Source #

_ParseErrorE ∷ Prism' (Error uni fun ann) ParserErrorBundle Source #

_UniqueCoherencyErrorE ∷ Prism' (Error uni fun ann) (UniqueError ann) Source #

_TypeErrorE ∷ Prism' (Error uni fun ann) (TypeError (Term TyName Name uni fun ()) uni fun ann) Source #

_NormCheckErrorE ∷ Prism' (Error uni fun ann) (NormCheckError TyName Name uni fun ann) Source #

_FreeVariableErrorE ∷ Prism' (Error uni fun ann) FreeVariableError Source #

data NormCheckError tyname name uni fun ann Source #

Constructors

BadType !ann !(Type tyname uni ann) !Text 
BadTerm !ann !(Term tyname name uni fun ann) !Text 

Instances

Instances details
(Pretty ann, PrettyBy config (Type tyname uni ann), PrettyBy config (Term tyname name uni fun ann)) ⇒ PrettyBy config (NormCheckError tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

prettyBy ∷ config → NormCheckError tyname name uni fun ann → Doc ann0 Source #

prettyListBy ∷ config → [NormCheckError tyname name uni fun ann] → Doc ann0 Source #

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

Defined in PlutusCore.Error

Methods

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

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

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

Defined in PlutusCore.Error

Associated Types

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

Methods

fromNormCheckError tyname name uni fun ann → Rep (NormCheckError tyname name uni fun ann) x Source #

toRep (NormCheckError tyname name uni fun ann) x → NormCheckError tyname name uni fun ann Source #

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

Defined in PlutusCore.Error

Methods

showsPrecIntNormCheckError tyname name uni fun ann → ShowS Source #

showNormCheckError tyname name uni fun ann → String Source #

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

(NFData tyname, NFData name, Closed uni, Everywhere uni NFData, NFData fun, NFData ann) ⇒ NFData (NormCheckError tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

rnfNormCheckError tyname name uni fun ann → () Source #

(Eq (Term tyname name uni fun ann), Eq (Type tyname uni ann), GEq uni, Closed uni, Everywhere uni Eq, Eq fun, Eq ann) ⇒ Eq (NormCheckError tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

(==)NormCheckError tyname name uni fun ann → NormCheckError tyname name uni fun ann → Bool Source #

(/=)NormCheckError tyname name uni fun ann → NormCheckError tyname name uni fun ann → Bool Source #

AsNormCheckError (NormCheckError tyname name uni fun ann) tyname name uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_NormCheckError ∷ Prism' (NormCheckError tyname name uni fun ann) (NormCheckError tyname name uni fun ann) Source #

_BadType ∷ Prism' (NormCheckError tyname name uni fun ann) (ann, Type tyname uni ann, Text) Source #

_BadTerm ∷ Prism' (NormCheckError tyname name uni fun ann) (ann, Term tyname name uni fun ann, Text) Source #

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

Defined in PlutusCore.Error

class AsNormCheckError r tyname name uni fun ann | r → tyname name uni fun ann where Source #

Minimal complete definition

_NormCheckError

Methods

_NormCheckError ∷ Prism' r (NormCheckError tyname name uni fun ann) Source #

_BadType ∷ Prism' r (ann, Type tyname uni ann, Text) Source #

_BadTerm ∷ Prism' r (ann, Term tyname name uni fun ann, Text) Source #

Instances

Instances details
(tyname ~ TyName, name ~ Name) ⇒ AsNormCheckError (Error uni fun ann) tyname name uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_NormCheckError ∷ Prism' (Error uni fun ann) (NormCheckError tyname name uni fun ann) Source #

_BadType ∷ Prism' (Error uni fun ann) (ann, Type tyname uni ann, Text) Source #

_BadTerm ∷ Prism' (Error uni fun ann) (ann, Term tyname name uni fun ann, Text) Source #

AsNormCheckError (NormCheckError tyname name uni fun ann) tyname name uni fun ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_NormCheckError ∷ Prism' (NormCheckError tyname name uni fun ann) (NormCheckError tyname name uni fun ann) Source #

_BadType ∷ Prism' (NormCheckError tyname name uni fun ann) (ann, Type tyname uni ann, Text) Source #

_BadTerm ∷ Prism' (NormCheckError tyname name uni fun ann) (ann, Term tyname name uni fun ann, Text) Source #

data UniqueError ann Source #

Constructors

MultiplyDefined !Unique !ann !ann 
IncoherentUsage !Unique !ann !ann 
FreeVariable !Unique !ann 

Instances

Instances details
Functor UniqueError Source # 
Instance details

Defined in PlutusCore.Error

Methods

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

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

Exception (UniqueError SrcSpan) Source # 
Instance details

Defined in PlutusCore.Error

Generic (UniqueError ann) Source # 
Instance details

Defined in PlutusCore.Error

Associated Types

type Rep (UniqueError ann) ∷ TypeType Source #

Methods

fromUniqueError ann → Rep (UniqueError ann) x Source #

toRep (UniqueError ann) x → UniqueError ann Source #

Show ann ⇒ Show (UniqueError ann) Source # 
Instance details

Defined in PlutusCore.Error

NFData ann ⇒ NFData (UniqueError ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

rnfUniqueError ann → () Source #

Eq ann ⇒ Eq (UniqueError ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

(==)UniqueError ann → UniqueError ann → Bool Source #

(/=)UniqueError ann → UniqueError ann → Bool Source #

Pretty ann ⇒ Pretty (UniqueError ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

prettyUniqueError ann → Doc ann0 Source #

prettyList ∷ [UniqueError ann] → Doc ann0 Source #

AsUniqueError (UniqueError ann) ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_UniqueError ∷ Prism' (UniqueError ann) (UniqueError ann) Source #

_MultiplyDefined ∷ Prism' (UniqueError ann) (Unique, ann, ann) Source #

_IncoherentUsage ∷ Prism' (UniqueError ann) (Unique, ann, ann) Source #

_FreeVariable ∷ Prism' (UniqueError ann) (Unique, ann) Source #

type Rep (UniqueError ann) Source # 
Instance details

Defined in PlutusCore.Error

class AsUniqueError r ann | r → ann where Source #

Minimal complete definition

_UniqueError

Methods

_UniqueError ∷ Prism' r (UniqueError ann) Source #

_MultiplyDefined ∷ Prism' r (Unique, ann, ann) Source #

_IncoherentUsage ∷ Prism' r (Unique, ann, ann) Source #

_FreeVariable ∷ Prism' r (Unique, ann) Source #

Instances

Instances details
AsUniqueError (UniqueError ann) ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_UniqueError ∷ Prism' (UniqueError ann) (UniqueError ann) Source #

_MultiplyDefined ∷ Prism' (UniqueError ann) (Unique, ann, ann) Source #

_IncoherentUsage ∷ Prism' (UniqueError ann) (Unique, ann, ann) Source #

_FreeVariable ∷ Prism' (UniqueError ann) (Unique, ann) Source #

AsUniqueError (Error uni fun ann) ann Source # 
Instance details

Defined in PlutusCore.Error

Methods

_UniqueError ∷ Prism' (Error uni fun ann) (UniqueError ann) Source #

_MultiplyDefined ∷ Prism' (Error uni fun ann) (Unique, ann, ann) Source #

_IncoherentUsage ∷ Prism' (Error uni fun ann) (Unique, ann, ann) Source #

_FreeVariable ∷ Prism' (Error uni fun ann) (Unique, ann) Source #

data FreeVariableError Source #

We cannot do a correct translation to or from de Bruijn indices if the program is not well-scoped. So we throw an error in such a case.

Constructors

FreeUnique !Unique 
FreeIndex !Index 

Instances

Instances details
Exception FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Generic FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Associated Types

type Rep FreeVariableErrorTypeType Source #

Show FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

NFData FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

rnfFreeVariableError → () Source #

Eq FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Ord FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

AsFreeVariableError FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Pretty FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

type Rep FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

type Rep FreeVariableError = D1 ('MetaData "FreeVariableError" "PlutusCore.DeBruijn.Internal" "plutus-core-1.34.0.0-inplace" 'False) (C1 ('MetaCons "FreeUnique" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Unique)) :+: C1 ('MetaCons "FreeIndex" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Index)))

class AsFreeVariableError r where Source #

Minimal complete definition

_FreeVariableError

Instances

Instances details
AsFreeVariableError FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

AsFreeVariableError (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

_FreeVariableError ∷ Prism' (Error uni fun ann) FreeVariableError Source #

_FreeUnique ∷ Prism' (Error uni fun ann) Unique Source #

_FreeIndex ∷ Prism' (Error uni fun ann) Index Source #

Quotation and term construction

type Quote = QuoteT Identity Source #

A non-transformer version of QuoteT.

runQuoteQuote a → a Source #

data QuoteT m a Source #

The "quotation" monad transformer. Within this monad you can do safe construction of PLC terms using quasiquotation, fresh-name generation, and parsing.

Instances

Instances details
MonadTrans QuoteT Source # 
Instance details

Defined in PlutusCore.Quote

Methods

liftMonad m ⇒ m a → QuoteT m a Source #

MFunctor QuoteT Source # 
Instance details

Defined in PlutusCore.Quote

Methods

hoist ∷ ∀ m n (b ∷ k). Monad m ⇒ (∀ a. m a → n a) → QuoteT m b → QuoteT n b Source #

MonadError e m ⇒ MonadError e (QuoteT m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

throwError ∷ e → QuoteT m a Source #

catchErrorQuoteT m a → (e → QuoteT m a) → QuoteT m a Source #

MonadReader r m ⇒ MonadReader r (QuoteT m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

askQuoteT m r Source #

local ∷ (r → r) → QuoteT m a → QuoteT m a Source #

reader ∷ (r → a) → QuoteT m a Source #

MonadState s m ⇒ MonadState s (QuoteT m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

getQuoteT m s Source #

put ∷ s → QuoteT m () Source #

state ∷ (s → (a, s)) → QuoteT m a Source #

MonadWriter w m ⇒ MonadWriter w (QuoteT m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

writer ∷ (a, w) → QuoteT m a Source #

tell ∷ w → QuoteT m () Source #

listenQuoteT m a → QuoteT m (a, w) Source #

passQuoteT m (a, w → w) → QuoteT m a Source #

MonadFix m ⇒ MonadFix (QuoteT m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

mfix ∷ (a → QuoteT m a) → QuoteT m a Source #

MonadIO m ⇒ MonadIO (QuoteT m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

liftIOIO a → QuoteT m a Source #

Monad m ⇒ Applicative (QuoteT m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

pure ∷ a → QuoteT m a Source #

(<*>)QuoteT m (a → b) → QuoteT m a → QuoteT m b Source #

liftA2 ∷ (a → b → c) → QuoteT m a → QuoteT m b → QuoteT m c Source #

(*>)QuoteT m a → QuoteT m b → QuoteT m b Source #

(<*)QuoteT m a → QuoteT m b → QuoteT m a Source #

Functor m ⇒ Functor (QuoteT m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

fmap ∷ (a → b) → QuoteT m a → QuoteT m b Source #

(<$) ∷ a → QuoteT m b → QuoteT m a Source #

Monad m ⇒ Monad (QuoteT m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

(>>=)QuoteT m a → (a → QuoteT m b) → QuoteT m b Source #

(>>)QuoteT m a → QuoteT m b → QuoteT m b Source #

return ∷ a → QuoteT m a Source #

Monad m ⇒ MonadQuote (QuoteT m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

liftQuoteQuote a → QuoteT m a Source #

runQuoteTMonad m ⇒ QuoteT m a → m a Source #

Run a quote from an empty identifier state. Note that the resulting term cannot necessarily be safely combined with other terms - that should happen inside QuoteT.

class Monad m ⇒ MonadQuote m Source #

A monad that allows lifting of quoted expressions.

Instances

Instances details
MonadQuote m ⇒ MonadQuote (GenT m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

liftQuoteQuote a → GenT m a Source #

MonadQuote m ⇒ MonadQuote (PropertyT m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

liftQuoteQuote a → PropertyT m a Source #

Monad m ⇒ MonadQuote (QuoteT m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

liftQuoteQuote a → QuoteT m a Source #

MonadQuote m ⇒ MonadQuote (MaybeT m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

liftQuoteQuote a → MaybeT m a Source #

MonadQuote m ⇒ MonadQuote (RenameT ren m) Source # 
Instance details

Defined in PlutusCore.Rename.Monad

Methods

liftQuoteQuote a → RenameT ren m a Source #

MonadQuote m ⇒ MonadQuote (ExceptT e m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

liftQuoteQuote a → ExceptT e m a Source #

MonadQuote m ⇒ MonadQuote (ReaderT r m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

liftQuoteQuote a → ReaderT r m a Source #

MonadQuote m ⇒ MonadQuote (StateT s m) Source # 
Instance details

Defined in PlutusCore.Quote

Methods

liftQuoteQuote a → StateT s m a Source #

(Stream s, MonadQuote m) ⇒ MonadQuote (ParsecT e s m) Source # 
Instance details

Defined in PlutusCore.Parser.ParserCommon

Methods

liftQuoteQuote a → ParsecT e s m a Source #

MonadQuote m ⇒ MonadQuote (NormalizeTypeT m tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Normalize.Internal

Methods

liftQuoteQuote a → NormalizeTypeT m tyname uni ann a Source #

liftQuoteMonadQuote m ⇒ Quote a → m a Source #

Name generation

freshUniqueMonadQuote m ⇒ m Unique Source #

Get a fresh Unique.

freshNameMonadQuote m ⇒ Text → m Name Source #

Get a fresh Name, given the annotation and the Text name.

freshTyNameMonadQuote m ⇒ Text → m TyName Source #

Get a fresh TyName, given the annotation and the Text name.

Evaluation

data EvaluationResult a Source #

The parameterized type of results various evaluation engines return. On the PLC side this becomes (via makeKnown) either a call to Error or a value of the PLC counterpart of type a.

Instances

Instances details
MonadFail EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Foldable EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Methods

foldMonoid m ⇒ EvaluationResult m → m Source #

foldMapMonoid m ⇒ (a → m) → EvaluationResult a → m Source #

foldMap'Monoid m ⇒ (a → m) → EvaluationResult a → m Source #

foldr ∷ (a → b → b) → b → EvaluationResult a → b Source #

foldr' ∷ (a → b → b) → b → EvaluationResult a → b Source #

foldl ∷ (b → a → b) → b → EvaluationResult a → b Source #

foldl' ∷ (b → a → b) → b → EvaluationResult a → b Source #

foldr1 ∷ (a → a → a) → EvaluationResult a → a Source #

foldl1 ∷ (a → a → a) → EvaluationResult a → a Source #

toListEvaluationResult a → [a] Source #

nullEvaluationResult a → Bool Source #

lengthEvaluationResult a → Int Source #

elemEq a ⇒ a → EvaluationResult a → Bool Source #

maximumOrd a ⇒ EvaluationResult a → a Source #

minimumOrd a ⇒ EvaluationResult a → a Source #

sumNum a ⇒ EvaluationResult a → a Source #

productNum a ⇒ EvaluationResult a → a Source #

Traversable EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Methods

traverseApplicative f ⇒ (a → f b) → EvaluationResult a → f (EvaluationResult b) Source #

sequenceAApplicative f ⇒ EvaluationResult (f a) → f (EvaluationResult a) Source #

mapMMonad m ⇒ (a → m b) → EvaluationResult a → m (EvaluationResult b) Source #

sequenceMonad m ⇒ EvaluationResult (m a) → m (EvaluationResult a) Source #

Alternative EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Applicative EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Functor EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Methods

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

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

Monad EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

MonadError () EvaluationResult Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

KnownTypeAst tyname uni a ⇒ KnownTypeAst tyname uni (EvaluationResult a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Builtin.KnownTypeAst

Associated Types

type IsBuiltin uni (EvaluationResult a) ∷ Bool Source #

type ToHoles uni (EvaluationResult a) ∷ [Hole] Source #

type ToBinds uni acc (EvaluationResult a) ∷ [Some TyNameRep] Source #

Methods

typeAstType0 tyname uni () Source #

(TypeError ('Text "Use \8216BuiltinResult\8217 instead of \8216EvaluationResult\8217") ∷ Constraint, uni ~ UniOf val) ⇒ MakeKnownIn uni val (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Builtin.KnownType

(TypeError ('Text "Use \8216BuiltinResult\8217 instead of \8216EvaluationResult\8217") ∷ Constraint, uni ~ UniOf val) ⇒ ReadKnownIn uni val (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Builtin.KnownType

PrettyBy config a ⇒ PrettyBy config (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Methods

prettyBy ∷ config → EvaluationResult a → Doc ann Source #

prettyListBy ∷ config → [EvaluationResult a] → Doc ann Source #

Generic (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Associated Types

type Rep (EvaluationResult a) ∷ TypeType Source #

Show a ⇒ Show (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

NFData a ⇒ NFData (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Methods

rnfEvaluationResult a → () Source #

Eq a ⇒ Eq (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

AsEvaluationFailure (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Methods

_EvaluationFailure ∷ Prism' (EvaluationResult a) () Source #

PrettyClassic a ⇒ Pretty (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

type ToBinds uni acc (EvaluationResult a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Builtin.KnownTypeAst

type ToBinds uni acc (EvaluationResult a ∷ Type) = ToBinds uni acc a
type IsBuiltin uni (EvaluationResult a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Builtin.KnownTypeAst

type IsBuiltin uni (EvaluationResult a ∷ Type) = 'False
type ToHoles uni (EvaluationResult a ∷ Type) Source # 
Instance details

Defined in PlutusCore.Builtin.KnownTypeAst

type ToHoles uni (EvaluationResult a ∷ Type) = '[TypeHole a ∷ Hole]
type Rep (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

type Rep (EvaluationResult a) = D1 ('MetaData "EvaluationResult" "PlutusCore.Evaluation.Result" "plutus-core-1.34.0.0-inplace" 'False) (C1 ('MetaCons "EvaluationSuccess" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)) :+: C1 ('MetaCons "EvaluationFailure" 'PrefixI 'False) (U1TypeType))

Combining programs

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

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

Benchmarking

termSizeTerm tyname name uni fun ann → Size Source #

Count the number of AST nodes in a term.

typeSizeType tyname uni ann → Size Source #

Count the number of AST nodes in a type.

kindSizeKind a → Size Source #

Count the number of AST nodes in a kind.

>>> kindSize $ Type ()
Size {unSize = 1}
>>> kindSize $ KindArrow () (KindArrow () (Type ()) (Type ())) (Type ())
Size {unSize = 5}

programSizeProgram tyname name uni fun ann → Size Source #

Count the number of AST nodes in a program.

serialisedSizeFlat a ⇒ a → Integer Source #

Compute the size of the serializabled form of a value.