plutus-core-0.1.0.0: Language library for Plutus Core
Safe HaskellNone
LanguageHaskell2010

PlutusCore

Synopsis

Parser

parseProgram :: (AsParseError e AlexPosn, MonadError e m, MonadQuote m) => ByteString -> m (Program TyName Name DefaultUni DefaultFun AlexPosn) Source #

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

parseTerm :: (AsParseError e AlexPosn, MonadError e m, MonadQuote m) => ByteString -> m (Term TyName Name DefaultUni DefaultFun AlexPosn) Source #

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

parseType :: (AsParseError e AlexPosn, MonadError e m, MonadQuote m) => ByteString -> m (Type TyName DefaultUni AlexPosn) Source #

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

parseScoped :: (AsParseError e AlexPosn, AsUniqueError e AlexPosn, MonadError e m, MonadQuote m) => ByteString -> m (Program TyName Name DefaultUni DefaultFun AlexPosn) Source #

Parse and rewrite so that names are globally unique, not just unique within their scope.

Builtins

data Some (tag :: k -> Type) where Source #

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

>>> data Tag :: * -> * 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 :: forall k tag (a :: k). () => tag a -> Some tag 

Instances

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

compare :: Some 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 #

max :: Some tag -> Some tag -> Some tag Source #

min :: Some tag -> Some tag -> Some tag 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

showsPrec :: Int -> Some tag -> ShowS Source #

show :: Some tag -> String Source #

showList :: [Some tag] -> ShowS Source #

Applicative m => Semigroup (Some m) 
Instance details

Defined in Data.Some.Newtype

Methods

(<>) :: Some m -> Some m -> Some m Source #

sconcat :: NonEmpty (Some m) -> Some m Source #

stimes :: Integral b => b -> Some m -> Some m Source #

Applicative m => Monoid (Some m) 
Instance details

Defined in Data.Some.Newtype

Methods

mempty :: Some m Source #

mappend :: Some m -> Some m -> Some m Source #

mconcat :: [Some m] -> Some m Source #

GNFData tag => NFData (Some tag) 
Instance details

Defined in Data.Some.Newtype

Methods

rnf :: Some tag -> () Source #

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

Defined in PlutusCore.Flat

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

Defined in PlutusCore.Pretty.PrettyConst

Methods

pretty :: Some (ValueOf uni) -> Doc ann Source #

prettyList :: [Some (ValueOf uni)] -> Doc ann Source #

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

Defined in PlutusCore.Evaluation.Machine.ExMemory

data SomeTypeIn uni Source #

A particular type from a universe.

Constructors

forall k (a :: k). SomeTypeIn !(uni (Esc a)) 

Instances

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

GShow uni => Show (SomeTypeIn uni) Source # 
Instance details

Defined in Universe.Core

Closed uni => NFData (SomeTypeIn uni) Source # 
Instance details

Defined in Universe.Core

Methods

rnf :: SomeTypeIn uni -> () Source #

Closed uni => Flat (SomeTypeIn uni) Source # 
Instance details

Defined in PlutusCore.Flat

GShow uni => Pretty (SomeTypeIn uni) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

pretty :: SomeTypeIn uni -> Doc ann Source #

prettyList :: [SomeTypeIn uni] -> Doc ann Source #

ExMemoryUsage (SomeTypeIn uni) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

data Kinded uni ta where Source #

Constructors

Kinded :: Typeable k => !(uni (Esc a)) -> Kinded uni (Esc (a :: k)) 

Instances

Instances details
GShow uni => GShow (Kinded uni :: Type -> Type) Source # 
Instance details

Defined in Universe.Core

Methods

gshowsPrec :: forall (a :: k). Int -> Kinded uni a -> ShowS Source #

GShow uni => Show (Kinded uni ta) Source # 
Instance details

Defined in Universe.Core

Methods

showsPrec :: Int -> Kinded uni ta -> ShowS Source #

show :: Kinded 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
(GShow uni, Closed uni, Everywhere uni Show) => GShow (ValueOf uni :: Type -> Type) Source # 
Instance details

Defined in Universe.Core

Methods

gshowsPrec :: forall (a :: k). Int -> ValueOf uni a -> ShowS Source #

(GEq uni, Closed uni, Everywhere uni Eq) => GEq (ValueOf uni :: Type -> Type) Source # 
Instance details

Defined in Universe.Core

Methods

geq :: forall (a :: k) (b :: k). ValueOf uni a -> ValueOf uni b -> Maybe (a :~: b) Source #

(GCompare uni, Closed uni, Everywhere uni Ord, Everywhere uni Eq) => GCompare (ValueOf uni :: Type -> Type) Source # 
Instance details

Defined in Universe.Core

Methods

gcompare :: forall (a :: k) (b :: k). ValueOf uni a -> ValueOf uni b -> GOrdering a b Source #

(Closed uni, Everywhere uni NFData) => GNFData (ValueOf uni) Source # 
Instance details

Defined in Universe.Core

Methods

grnf :: ValueOf uni a -> () 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

compare :: ValueOf 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 #

max :: ValueOf uni a -> ValueOf uni a -> ValueOf uni a Source #

min :: ValueOf uni a -> ValueOf uni a -> ValueOf uni a Source #

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

Defined in Universe.Core

Methods

showsPrec :: Int -> ValueOf uni a -> ShowS Source #

show :: ValueOf 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

rnf :: ValueOf uni a -> () Source #

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

Defined in PlutusCore.Flat

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

Defined in PlutusCore.Pretty.PrettyConst

Methods

pretty :: Some (ValueOf uni) -> Doc ann Source #

prettyList :: [Some (ValueOf uni)] -> Doc ann Source #

(Closed uni, Everywhere uni PrettyConst) => Pretty (ValueOf uni a) Source #

Special treatment for built-in constants: see the Note in PlutusCore.Pretty.PrettyConst.

Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

pretty :: ValueOf uni a -> Doc ann Source #

prettyList :: [ValueOf uni a] -> Doc ann Source #

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

Defined in PlutusCore.Evaluation.Machine.ExMemory

someValueOf :: forall a uni. uni (Esc a) -> a -> Some (ValueOf uni) Source #

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

someValue :: forall a uni. uni `Includes` 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 f, Contains DefaultUni a) => Contains DefaultUni (f a :: k2) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc (f a)) Source #

Contains DefaultUni Bool 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

knownUni :: DefaultUni (Esc ()) Source #

Contains DefaultUni ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni (,) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni [] Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc []) Source #

(TypeError NoStandalonePolymorphicDataErrMsg :: Constraint) => Contains uni (TyVarRep :: TyNameRep kind -> kind) Source # 
Instance details

Defined in PlutusCore.Builtin.Polymorphism

Methods

knownUni :: uni (Esc TyVarRep) Source #

type Includes uni = Permits (Contains uni) Source #

uni Includes a reads as "a is in the uni". a can be of a higher-kind, see the docs of Contains on why you might want that.

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 :: Type -> Constraint) :: 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 :: (forall 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

encodeUni :: DefaultUni a -> [Int] Source #

withDecodedUni :: (forall k (a :: k). Typeable k => DefaultUni (Esc a) -> DecodeUniM r) -> DecodeUniM r Source #

bring :: Everywhere 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 = showsPrec

Methods

gshowsPrec :: forall (a :: k). Int -> t a -> ShowS Source #

Instances

Instances details
GShow DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

gshowsPrec :: forall (a :: k). Int -> DefaultUni a -> ShowS Source #

(GShow uni, Closed uni, Everywhere uni Show) => GShow (ValueOf uni :: Type -> Type) Source # 
Instance details

Defined in Universe.Core

Methods

gshowsPrec :: forall (a :: k). Int -> ValueOf uni a -> ShowS Source #

GShow uni => GShow (Kinded uni :: Type -> Type) Source # 
Instance details

Defined in Universe.Core

Methods

gshowsPrec :: forall (a :: k). Int -> Kinded uni a -> ShowS Source #

GShow (TypeRep :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec :: forall (a :: k0). Int -> TypeRep a -> ShowS Source #

GShow (GOrdering a :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec :: forall (a0 :: k0). Int -> GOrdering a a0 -> ShowS Source #

GShow ((:~:) a :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec :: forall (a0 :: k0). Int -> (a :~: 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 :: forall (a0 :: k0). Int -> Sum a b 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 :: forall (a0 :: k0). Int -> Product a b a0 -> ShowS Source #

show :: Show 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.

Methods

geq :: forall (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 DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

geq :: forall (a :: k) (b :: k). DefaultUni a -> DefaultUni b -> Maybe (a :~: b) Source #

(GEq uni, Closed uni, Everywhere uni Eq) => GEq (ValueOf uni :: Type -> Type) Source # 
Instance details

Defined in Universe.Core

Methods

geq :: forall (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 :: forall (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 :: forall (a0 :: k0) (b :: k0). (a :~: a0) -> (a :~: b) -> Maybe (a0 :~: b) Source #

(GEq a, GEq b) => GEq (Sum a b :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

geq :: forall (a0 :: k0) (b0 :: k0). Sum a b a0 -> Sum a b b0 -> Maybe (a0 :~: b0) Source #

(GEq a, GEq b) => GEq (Product a b :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

geq :: forall (a0 :: k0) (b0 :: k0). Product a b a0 -> Product a b b0 -> Maybe (a0 :~: b0) Source #

deriveGEq :: DeriveGEQ t => t -> Q [Dec] Source #

class HasUniApply (uni :: Type -> Type) where Source #

A class for "uni has general type application".

Methods

matchUniApply Source #

Arguments

:: uni tb

The type.

-> r

What to return if the type is not an application.

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

matchUniApply :: DefaultUni tb -> r -> (forall k l (f :: k -> l) (a :: k). tb ~ Esc (f a) => DefaultUni (Esc f) -> DefaultUni (Esc a) -> r) -> r Source #

checkStar :: forall 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 :: forall (a :: Type) (ab :: Type) f x uni m r. (Typeable ab, Typeable a, MonadPlus m) => uni (Esc (f :: ab)) -> uni (Esc (x :: a)) -> (forall (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 :: forall 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 :: forall (a :: k0). a :~: a Source #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). (b :~: c) -> (a :~: b) -> a :~: c Source #

Semigroupoid ((:~:) :: k -> k -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k0) (k1 :: k0) (i :: k0). (j :~: k1) -> (i :~: j) -> i :~: k1 Source #

TestEquality ((:~:) a :: k -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

testEquality :: forall (a0 :: k0) (b :: k0). (a :~: a0) -> (a :~: b) -> Maybe (a0 :~: b) Source #

GShow ((:~:) a :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gshowsPrec :: forall (a0 :: k0). Int -> (a :~: a0) -> ShowS Source #

GRead ((:~:) a :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

greadsPrec :: Int -> GReadS ((:~:) a) Source #

GEq ((:~:) a :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

geq :: forall (a0 :: k0) (b :: k0). (a :~: a0) -> (a :~: b) -> Maybe (a0 :~: b) Source #

GCompare ((:~:) a :: k -> Type) 
Instance details

Defined in Data.GADT.Internal

Methods

gcompare :: forall (a0 :: k0) (b :: k0). (a :~: a0) -> (a :~: b) -> GOrdering a0 b Source #

NFData2 ((:~:) :: Type -> Type -> Type)

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

toEnum :: Int -> 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 #

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 #

(a ~ b, Data a) => Data (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> (a :~: b) -> c (a :~: b) Source #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (a :~: b) Source #

toConstr :: (a :~: b) -> Constr Source #

dataTypeOf :: (a :~: b) -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (a :~: b)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (a :~: b)) Source #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> (a :~: b) -> a :~: b Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (a :~: b) -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (a :~: b) -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> (a :~: b) -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (a :~: b) -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) 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 #

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

showsPrec :: Int -> (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 #

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

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

data DefaultUni a where Source #

The universe used by default.

Instances

Instances details
HasUniApply DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

matchUniApply :: DefaultUni tb -> r -> (forall k l (f :: k -> l) (a :: k). tb ~ Esc (f a) => DefaultUni (Esc f) -> DefaultUni (Esc a) -> r) -> r Source #

Closed DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type Everywhere DefaultUni constr Source #

Methods

encodeUni :: DefaultUni a -> [Int] Source #

withDecodedUni :: (forall k (a :: k). Typeable k => DefaultUni (Esc a) -> DecodeUniM r) -> DecodeUniM r Source #

bring :: Everywhere DefaultUni constr => proxy constr -> DefaultUni (Esc a) -> (constr a => r) -> r Source #

ToKind DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

toSingKind :: forall k (a :: k). DefaultUni (Esc a) -> SingKind k Source #

TestTypesFromTheUniverseAreAllKnown DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

GShow DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

gshowsPrec :: forall (a :: k). Int -> DefaultUni a -> ShowS Source #

GEq DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

geq :: forall (a :: k) (b :: k). DefaultUni a -> DefaultUni b -> Maybe (a :~: b) Source #

GCompare DefaultUni Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

gcompare :: forall (a :: k) (b :: k). DefaultUni a -> DefaultUni b -> GOrdering a b Source #

HasConstantIn DefaultUni term => KnownTypeIn DefaultUni term Int Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: (MonadError (ErrorWithCause err cause) m, AsEvaluationFailure err) => (Text -> m ()) -> Maybe cause -> Int -> m term Source #

readKnown :: (AsUnliftingError err, AsEvaluationFailure err) => Maybe cause -> term -> Either (ErrorWithCause err cause) Int Source #

KnownBuiltinTypeIn DefaultUni term Data => KnownTypeIn DefaultUni term Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: (MonadError (ErrorWithCause err cause) m, AsEvaluationFailure err) => (Text -> m ()) -> Maybe cause -> Data -> m term Source #

readKnown :: (AsUnliftingError err, AsEvaluationFailure err) => Maybe cause -> term -> Either (ErrorWithCause err cause) Data Source #

KnownBuiltinTypeIn DefaultUni term Bool => KnownTypeIn DefaultUni term Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: (MonadError (ErrorWithCause err cause) m, AsEvaluationFailure err) => (Text -> m ()) -> Maybe cause -> Bool -> m term Source #

readKnown :: (AsUnliftingError err, AsEvaluationFailure err) => Maybe cause -> term -> Either (ErrorWithCause err cause) Bool Source #

KnownBuiltinTypeIn DefaultUni term () => KnownTypeIn DefaultUni term () Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: (MonadError (ErrorWithCause err cause) m, AsEvaluationFailure err) => (Text -> m ()) -> Maybe cause -> () -> m term Source #

readKnown :: (AsUnliftingError err, AsEvaluationFailure err) => Maybe cause -> term -> Either (ErrorWithCause err cause) () Source #

KnownBuiltinTypeIn DefaultUni term Text => KnownTypeIn DefaultUni term Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: (MonadError (ErrorWithCause err cause) m, AsEvaluationFailure err) => (Text -> m ()) -> Maybe cause -> Text -> m term Source #

readKnown :: (AsUnliftingError err, AsEvaluationFailure err) => Maybe cause -> term -> Either (ErrorWithCause err cause) Text Source #

KnownBuiltinTypeIn DefaultUni term ByteString => KnownTypeIn DefaultUni term ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: (MonadError (ErrorWithCause err cause) m, AsEvaluationFailure err) => (Text -> m ()) -> Maybe cause -> ByteString -> m term Source #

readKnown :: (AsUnliftingError err, AsEvaluationFailure err) => Maybe cause -> term -> Either (ErrorWithCause err cause) ByteString Source #

KnownBuiltinTypeIn DefaultUni term Integer => KnownTypeIn DefaultUni term Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: (MonadError (ErrorWithCause err cause) m, AsEvaluationFailure err) => (Text -> m ()) -> Maybe cause -> Integer -> m term Source #

readKnown :: (AsUnliftingError err, AsEvaluationFailure err) => Maybe cause -> term -> Either (ErrorWithCause err cause) Integer Source #

UniOf term ~ DefaultUni => KnownTypeIn DefaultUni term Void Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Methods

makeKnown :: (MonadError (ErrorWithCause err cause) m, AsEvaluationFailure err) => (Text -> m ()) -> Maybe cause -> Void -> m term Source #

readKnown :: (AsUnliftingError err, AsEvaluationFailure err) => Maybe cause -> term -> Either (ErrorWithCause err cause) Void Source #

(Contains DefaultUni f, Contains DefaultUni a) => Contains DefaultUni (f a :: k2) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc (f a)) Source #

KnownBuiltinTypeIn DefaultUni term [a] => KnownTypeIn DefaultUni term [a] Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: (MonadError (ErrorWithCause err cause) m, AsEvaluationFailure err) => (Text -> m ()) -> Maybe cause -> [a] -> m term Source #

readKnown :: (AsUnliftingError err, AsEvaluationFailure err) => Maybe cause -> term -> Either (ErrorWithCause err cause) [a] Source #

KnownBuiltinTypeIn DefaultUni term (a, b) => KnownTypeIn DefaultUni term (a, b) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: (MonadError (ErrorWithCause err cause) m, AsEvaluationFailure err) => (Text -> m ()) -> Maybe cause -> (a, b) -> m term Source #

readKnown :: (AsUnliftingError err, AsEvaluationFailure err) => Maybe cause -> term -> Either (ErrorWithCause err cause) (a, b) Source #

Show (DefaultUni a) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Bool 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

knownUni :: DefaultUni (Esc ()) Source #

Contains DefaultUni ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

KnownBuiltinTypeAst DefaultUni Bool => KnownTypeAst DefaultUni Bool Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles Bool :: [Hole] Source #

type ToBinds Bool :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy Bool -> Type TyName DefaultUni () Source #

KnownTypeAst DefaultUni Int Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles Int :: [Hole] Source #

type ToBinds Int :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy Int -> Type TyName DefaultUni () Source #

KnownBuiltinTypeAst DefaultUni Integer => KnownTypeAst DefaultUni Integer Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles Integer :: [Hole] Source #

type ToBinds Integer :: [Some TyNameRep] Source #

KnownBuiltinTypeAst DefaultUni () => KnownTypeAst DefaultUni () Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles () :: [Hole] Source #

type ToBinds () :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy () -> Type TyName DefaultUni () Source #

KnownBuiltinTypeAst DefaultUni ByteString => KnownTypeAst DefaultUni ByteString Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles ByteString :: [Hole] Source #

type ToBinds ByteString :: [Some TyNameRep] Source #

KnownBuiltinTypeAst DefaultUni Text => KnownTypeAst DefaultUni Text Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles Text :: [Hole] Source #

type ToBinds Text :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy Text -> Type TyName DefaultUni () Source #

KnownTypeAst DefaultUni Void Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Associated Types

type ToHoles Void :: [Hole] Source #

type ToBinds Void :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy Void -> Type TyName DefaultUni () Source #

KnownBuiltinTypeAst DefaultUni Data => KnownTypeAst DefaultUni Data Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles Data :: [Hole] Source #

type ToBinds Data :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy Data -> Type TyName DefaultUni () Source #

KnownBuiltinTypeAst DefaultUni [a] => KnownTypeAst DefaultUni ([a] :: Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type ToHoles [a] :: [Hole] Source #

type ToBinds [a] :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy [a] -> Type0 TyName DefaultUni () Source #

KnownBuiltinTypeAst DefaultUni (a, b) => KnownTypeAst DefaultUni ((a, b) :: Type) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

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

type ToBinds (a, b) :: [Some TyNameRep] Source #

Methods

toTypeAst :: proxy (a, b) -> Type0 TyName DefaultUni () Source #

Contains DefaultUni (,) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Contains DefaultUni [] Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc []) Source #

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 [], Permits constr (,), Permits constr Data)

pattern DefaultUniList :: forall a k1 k2 (f :: k1 -> k2) (a1 :: k1). () => forall. (a ~ Esc (f a1), Esc f ~ Esc []) => DefaultUni (Esc a1) -> DefaultUni a Source #

pattern DefaultUniPair :: forall a k1 k2 (f1 :: k1 -> k2) (a1 :: k1) k3 k4 (f2 :: k3 -> k4) (a2 :: k3). () => forall. (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.

Instances

Instances details
Bounded DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Enum 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

Show DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Ix DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Generic DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Associated Types

type Rep DefaultFun :: Type -> Type Source #

Hashable DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

NFData DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Methods

rnf :: DefaultFun -> () Source #

Flat DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Pretty DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

ExMemoryUsage DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

PrettyBy PrettyConfigPlc DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

uni ~ DefaultUni => ToBuiltinMeaning uni DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Associated Types

type CostingPart uni DefaultFun Source #

type Rep DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

type Rep DefaultFun = D1 ('MetaData "DefaultFun" "PlutusCore.Default.Builtins" "plutus-core-0.1.0.0-2XLgUgaJ2q72oJTCJd5lmc" 'False) (((((C1 ('MetaCons "AddInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SubtractInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MultiplyInteger" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "DivideInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "QuotientInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RemainderInteger" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ModInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EqualsInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LessThanInteger" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "LessThanEqualsInteger" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AppendByteString" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ConsByteString" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "SliceByteString" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LengthOfByteString" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IndexByteString" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "EqualsByteString" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LessThanByteString" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LessThanEqualsByteString" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Sha2_256" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Sha3_256" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Blake2b_256" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "VerifySignature" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AppendString" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EqualsString" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EncodeUtf8" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "DecodeUtf8" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IfThenElse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ChooseUnit" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Trace" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FstPair" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SndPair" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ChooseList" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MkCons" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HeadList" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TailList" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NullList" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ChooseData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ConstrData" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "MapData" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ListData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IData" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "BData" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UnConstrData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnMapData" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "UnListData" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UnIData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnBData" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "EqualsData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MkPairData" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MkNilData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MkNilPairData" 'PrefixI 'False) (U1 :: Type -> Type)))))))
type CostingPart uni DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

AST

data Term tyname name uni fun ann Source #

Constructors

Var ann name

a named variable

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

a constant term

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

Instances

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

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

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

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

Defined in PlutusCore.Error

Methods

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

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

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

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

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

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

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

collectScopeInfo :: Term tyname name uni fun NameAnn -> ScopeErrorOrInfo Source #

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusCore.MkPlc

Methods

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

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

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

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

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

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

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

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

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

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

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

typeLet :: ann -> TypeDef tyname uni ann -> Term tyname name uni fun ann -> Term tyname name uni fun ann Source #

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

Defined in PlutusCore.Core.Instance.Eq

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 #

(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 NamedTyDeBruijn NamedDeBruijn uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Eq

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

Defined in PlutusCore.Core.Type

Methods

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

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

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

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

Defined in PlutusCore.Core.Type

Associated Types

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

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

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

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

Defined in PlutusCore.Flat

Methods

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

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

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

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

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Recursive

Methods

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

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

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

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

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

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

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

Defined in PlutusCore.Core.Instance.Recursive

Methods

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

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

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

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

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

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

Defined in PlutusCore.Rename

Methods

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

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

Defined in PlutusCore.Builtin.HasConstant

Methods

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

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

Defined in PlutusCore.Builtin.HasConstant

Methods

asConstant :: (MonadError (ErrorWithCause err cause) m, AsUnliftingError err) => Maybe cause -> Term TyName Name uni fun ann -> m (Some (ValueOf (UniOf (Term TyName Name uni fun ann)))) 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-0.1.0.0-2XLgUgaJ2q72oJTCJd5lmc" 'False) (((C1 ('MetaCons "Var" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 name)) :+: C1 ('MetaCons "TyAbs" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tyname)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann))))) :+: (C1 ('MetaCons "LamAbs" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 name)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)))) :+: (C1 ('MetaCons "Apply" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)))) :+: C1 ('MetaCons "Constant" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Some (ValueOf uni))))))) :+: ((C1 ('MetaCons "Builtin" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 fun)) :+: C1 ('MetaCons "TyInst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann))))) :+: (C1 ('MetaCons "Unwrap" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann))) :+: (C1 ('MetaCons "IWrap" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)))) :+: C1 ('MetaCons "Error" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))))))
type Base (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Recursive

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

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

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 Types of the given Term.

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

Extract the universe from a type.

Instances

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

Defined in PlutusCore.Builtin.Polymorphism

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

Defined in PlutusCore.Evaluation.Machine.Ck

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

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

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

Defined in UntypedPlutusCore.Core.Type

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

Defined in PlutusCore.Core.Type

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

Defined in PlutusIR.Core.Type

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

data Type tyname uni ann Source #

A Type assigned to expressions.

Constructors

TyVar ann tyname 
TyFun ann (Type tyname uni ann) (Type tyname uni ann) 
TyIFix ann (Type tyname uni ann) (Type tyname uni ann)

Fix-point type, for constructing self-recursive types

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

Builtin type

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

Instances

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Type tyname uni a -> Doc ann Source #

prettyListBy :: PrettyConfigReadable configName -> [Type tyname uni a] -> Doc ann Source #

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

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

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

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

Functor (Type tyname uni) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Scoping

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusCore.Core.Instance.Eq

Methods

(==) :: Type TyName uni ann -> Type TyName uni ann -> Bool Source #

(/=) :: Type TyName uni ann -> Type TyName 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, 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 #

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

Defined in PlutusCore.Core.Type

Methods

showsPrec :: Int -> Type tyname uni ann -> ShowS Source #

show :: Type tyname uni ann -> String Source #

showList :: [Type tyname uni ann] -> ShowS Source #

Generic (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

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

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

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

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

Defined in PlutusCore.Flat

Methods

encode :: Type tyname uni ann -> Encoding Source #

decode :: Get (Type tyname uni ann) Source #

size :: Type tyname uni ann -> NumBits -> NumBits Source #

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

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

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

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

Recursive (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

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

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

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

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

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

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

Corecursive (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

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

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

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

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

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

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

Defined in PlutusCore.Rename

Methods

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

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

Defined in PlutusCore.Core.Type

type Rep (Type tyname uni ann) = D1 ('MetaData "Type" "PlutusCore.Core.Type" "plutus-core-0.1.0.0-2XLgUgaJ2q72oJTCJd5lmc" 'False) ((C1 ('MetaCons "TyVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tyname)) :+: (C1 ('MetaCons "TyFun" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))) :+: C1 ('MetaCons "TyIFix" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))))) :+: ((C1 ('MetaCons "TyForall" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tyname)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))) :+: C1 ('MetaCons "TyBuiltin" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SomeTypeIn uni)))) :+: (C1 ('MetaCons "TyLam" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 tyname)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Kind ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))) :+: C1 ('MetaCons "TyApp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)))))))
type Base (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Recursive

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

Defined in PlutusCore.Core.Type

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

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

Get all the direct child Types of the given Type.

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

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

Defined in PlutusCore.Core.Type

Methods

lift :: Kind ann -> Q Exp Source #

liftTyped :: Kind ann -> Q (TExp (Kind ann)) Source #

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

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

prettyBy :: PrettyConfigPlc -> Kind ann -> Doc ann0 Source #

prettyListBy :: PrettyConfigPlc -> [Kind ann] -> Doc ann0 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 #

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

Defined in PlutusCore.Core.Type

Methods

showsPrec :: Int -> Kind ann -> ShowS Source #

show :: Kind ann -> String Source #

showList :: [Kind ann] -> ShowS Source #

Generic (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

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

Methods

from :: Kind ann -> Rep (Kind ann) x Source #

to :: Rep (Kind ann) x -> Kind ann Source #

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

Defined in PlutusCore.Core.Type

Methods

hashWithSalt :: Int -> Kind ann -> Int Source #

hash :: Kind ann -> Int Source #

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

Defined in PlutusCore.Core.Type

Methods

rnf :: Kind ann -> () Source #

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

Defined in PlutusCore.Flat

Methods

encode :: Kind ann -> Encoding Source #

decode :: Get (Kind ann) Source #

size :: Kind ann -> NumBits -> NumBits Source #

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

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

pretty :: Kind ann -> Doc ann0 Source #

prettyList :: [Kind ann] -> Doc ann0 Source #

Recursive (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

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

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

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

gpara :: (Corecursive (Kind ann), Comonad w) => (forall b. Base (Kind ann) (w b) -> w (Base (Kind ann) b)) -> (Base (Kind ann) (EnvT (Kind ann) w a) -> a) -> Kind ann -> a Source #

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

gprepro :: (Corecursive (Kind ann), Comonad w) => (forall b. Base (Kind ann) (w b) -> w (Base (Kind ann) b)) -> (forall c. Base (Kind ann) c -> Base (Kind ann) c) -> (Base (Kind ann) (w a) -> a) -> Kind ann -> a Source #

Corecursive (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Recursive

Methods

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

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

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

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

gpostpro :: (Recursive (Kind ann), Monad m) => (forall b. m (Base (Kind ann) b) -> Base (Kind ann) (m b)) -> (forall c. Base (Kind ann) c -> Base (Kind ann) c) -> (a -> Base (Kind ann) (m a)) -> a -> Kind ann Source #

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

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Kind a -> Doc ann Source #

prettyListBy :: PrettyConfigReadable configName -> [Kind a] -> Doc ann Source #

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

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Kind ann -> Doc ann0 Source #

prettyListBy :: PrettyConfigClassic configName -> [Kind ann] -> Doc ann0 Source #

type Rep (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

type Base (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Recursive

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

Defined in PlutusCore.Core.Type

type HasUniques (Kind ann) = ()

data ParseError ann Source #

An error encountered during parsing.

Instances

Instances details
Functor ParseError Source # 
Instance details

Defined in PlutusCore.Error

Methods

fmap :: (a -> b) -> ParseError a -> ParseError b Source #

(<$) :: a -> ParseError b -> ParseError a Source #

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

Defined in PlutusCore.Error

Methods

(==) :: ParseError ann -> ParseError ann -> Bool Source #

(/=) :: ParseError ann -> ParseError ann -> Bool Source #

Ord ann => Ord (ParseError ann) Source # 
Instance details

Defined in PlutusCore.Error

Pretty ann => Show (ParseError ann) Source # 
Instance details

Defined in PlutusCore.Error

Generic (ParseError ann) Source # 
Instance details

Defined in PlutusCore.Error

Associated Types

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

Methods

from :: ParseError ann -> Rep (ParseError ann) x Source #

to :: Rep (ParseError ann) x -> ParseError ann Source #

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

Defined in PlutusCore.Error

Methods

rnf :: ParseError ann -> () Source #

(Ord ann, Pretty ann) => ShowErrorComponent (ParseError ann) Source # 
Instance details

Defined in PlutusCore.ParserCommon

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

Defined in PlutusCore.Error

Methods

pretty :: ParseError ann -> Doc ann0 Source #

prettyList :: [ParseError ann] -> Doc ann0 Source #

HasErrorCode (ParseError _a) Source # 
Instance details

Defined in PlutusCore.Error

AsParseError (ParseError ann) ann Source # 
Instance details

Defined in PlutusCore.Error

type Rep (ParseError ann) Source # 
Instance details

Defined in PlutusCore.Error

type Rep (ParseError ann)

data Version ann Source #

Version of Plutus Core to be used for the program.

Constructors

Version ann Natural Natural Natural 

Instances

Instances details
Functor Version Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

fmap :: (a -> b) -> Version a -> Version b Source #

(<$) :: a -> Version b -> Version a Source #

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

Defined in PlutusCore.Core.Type

Methods

(==) :: Version ann -> Version ann -> Bool Source #

(/=) :: Version ann -> Version ann -> Bool Source #

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

Defined in PlutusCore.Core.Type

Methods

showsPrec :: Int -> Version ann -> ShowS Source #

show :: Version ann -> String Source #

showList :: [Version ann] -> ShowS Source #

Generic (Version ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

Associated Types

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

Methods

from :: Version ann -> Rep (Version ann) x Source #

to :: Rep (Version ann) x -> Version ann Source #

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

Defined in PlutusCore.Core.Type

Methods

hashWithSalt :: Int -> Version ann -> Int Source #

hash :: Version ann -> Int Source #

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

Defined in PlutusCore.Core.Type

Methods

rnf :: Version ann -> () Source #

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

Defined in PlutusCore.Flat

Pretty (Version ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Common

Methods

pretty :: Version ann -> Doc ann0 Source #

prettyList :: [Version ann] -> Doc ann0 Source #

type Rep (Version ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

data Program tyname name uni fun ann Source #

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

Constructors

Program 

Fields

Instances

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

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

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

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

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

collectScopeInfo :: Program tyname name uni fun NameAnn -> ScopeErrorOrInfo Source #

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusCore.Core.Instance.Eq

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

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

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

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

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

Defined in PlutusCore.Core.Type

Associated Types

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

Methods

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

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

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

Defined in PlutusCore.Core.Type

Methods

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

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

Defined in PlutusCore.Flat

Methods

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

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

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

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

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

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

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

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

Defined in PlutusCore.Rename

Methods

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

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

Defined in PlutusCore.Core.Type

type Rep (Program tyname name uni fun ann) = D1 ('MetaData "Program" "PlutusCore.Core.Type" "plutus-core-0.1.0.0-2XLgUgaJ2q72oJTCJd5lmc" 'False) (C1 ('MetaCons "Program" 'PrefixI 'True) (S1 ('MetaSel ('Just "_progAnn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Just "_progVer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Version ann)) :*: S1 ('MetaSel ('Just "_progTerm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)))))
type HasUniques (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Type

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

data Name Source #

A Name represents variables/names in Plutus Core.

Constructors

Name 

Fields

Instances

Instances details
Eq Name Source # 
Instance details

Defined in PlutusCore.Name

Methods

(==) :: Name -> Name -> Bool Source #

(/=) :: Name -> Name -> Bool Source #

Ord Name Source # 
Instance details

Defined in PlutusCore.Name

Show Name Source # 
Instance details

Defined in PlutusCore.Name

Generic Name Source # 
Instance details

Defined in PlutusCore.Name

Associated Types

type Rep Name :: Type -> Type Source #

Methods

from :: Name -> Rep Name x Source #

to :: Rep Name x -> Name Source #

Hashable Name Source # 
Instance details

Defined in PlutusCore.Name

NFData Name Source # 
Instance details

Defined in PlutusCore.Name

Methods

rnf :: Name -> () Source #

Flat Name Source # 
Instance details

Defined in PlutusCore.Flat

ToScopedName Name Source # 
Instance details

Defined in PlutusCore.Check.Scoping

Lift Name Source # 
Instance details

Defined in PlutusCore.Name

Methods

lift :: Name -> Q Exp Source #

liftTyped :: Name -> Q (TExp Name) Source #

HasPrettyConfigName config => PrettyBy config Name Source # 
Instance details

Defined in PlutusCore.Name

Methods

prettyBy :: config -> Name -> Doc ann Source #

prettyListBy :: config -> [Name] -> Doc ann Source #

HasUnique Name TermUnique Source # 
Instance details

Defined in PlutusCore.Name

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusIR.Core.Instance.Scoping

Methods

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

name ~ Name => Reference Name (Binding tyname name uni fun) Source #

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

Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

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

Flat (Binder Name) Source # 
Instance details

Defined in PlutusCore.Flat

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

Defined in PlutusCore.Error

Methods

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

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

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

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

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

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

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

Defined in PlutusIR.Error

Methods

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

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

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

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

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

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

(GEq uni, Closed uni, Everywhere uni Eq, Eq fun, Eq ann) => Eq (Term Name uni fun ann) Source # 
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 #

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

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

Defined in PlutusCore.Builtin.HasConstant

Methods

asConstant :: (MonadError (ErrorWithCause err cause) m, AsUnliftingError err) => Maybe cause -> Term TyName Name uni fun ann -> m (Some (ValueOf (UniOf (Term TyName Name uni fun ann)))) Source #

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

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia :: (forall name. ToScopedName name => name -> NameAnn) -> Binding TyName Name uni fun ann -> t NameAnn -> t NameAnn Source #

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

Defined in PlutusIR.Core.Instance.Scoping

Methods

referenceVia :: (forall name. ToScopedName name => name -> NameAnn) -> Datatype TyName Name uni fun ann -> t NameAnn -> t NameAnn Source #

type Rep Name Source # 
Instance details

Defined in PlutusCore.Name

type Rep Name = D1 ('MetaData "Name" "PlutusCore.Name" "plutus-core-0.1.0.0-2XLgUgaJ2q72oJTCJd5lmc" 'False) (C1 ('MetaCons "Name" 'PrefixI 'True) (S1 ('MetaSel ('Just "nameString") '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
Eq TyName Source # 
Instance details

Defined in PlutusCore.Name

Ord TyName Source # 
Instance details

Defined in PlutusCore.Name

Show TyName Source # 
Instance details

Defined in PlutusCore.Name

Generic TyName Source # 
Instance details

Defined in PlutusCore.Name

Associated Types

type Rep TyName :: Type -> Type Source #

Hashable TyName Source # 
Instance details

Defined in PlutusCore.Name

NFData TyName Source # 
Instance details

Defined in PlutusCore.Name

Methods

rnf :: TyName -> () Source #

Flat TyName Source # 
Instance details

Defined in PlutusCore.Flat

Wrapped TyName Source # 
Instance details

Defined in PlutusCore.Name

Associated Types

type Unwrapped TyName Source #

ToScopedName TyName Source # 
Instance details

Defined in PlutusCore.Check.Scoping

Lift TyName Source # 
Instance details

Defined in PlutusCore.Name

HasPrettyConfigName config => PrettyBy config TyName Source # 
Instance details

Defined in PlutusCore.Name

Methods

prettyBy :: config -> TyName -> Doc ann Source #

prettyListBy :: config -> [TyName] -> Doc ann Source #

HasUnique TyName TypeUnique Source # 
Instance details

Defined in PlutusCore.Name

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusCore.Core.Instance.Scoping

Methods

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

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

Defined in PlutusIR.Core.Instance.Scoping

Methods

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

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

Defined in PlutusIR.Core.Instance.Scoping

Methods

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

tyname ~ TyName => Reference TyName (Datatype tyname name uni fun) Source #

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

Instance details

Defined in PlutusIR.Core.Instance.Scoping

Methods

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

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

Defined in PlutusIR.Core.Instance.Scoping

Methods

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

Flat (Binder TyName) Source # 
Instance details

Defined in PlutusCore.Flat

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

Defined in PlutusCore.Core.Instance.Eq

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