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

PlutusIR.Compiler.Definitions

Description

Support for generating PIR with global definitions with dependencies between them.

Synopsis

Documentation

data DefT key uni fun ann m a Source #

Instances

Instances details
(Ord key, Monad m) ⇒ MonadDefs key uni fun ann (DefT key uni fun ann m) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

liftDefDefT key uni fun ann Identity a → DefT key uni fun ann m a Source #

MFunctor (DefT key uni fun ann ∷ (TypeType) → TypeType) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

hoist ∷ ∀ m n (b ∷ k). Monad m ⇒ (∀ a. m a → n a) → DefT key uni fun ann m b → DefT key uni fun ann n b Source #

MonadError e m ⇒ MonadError e (DefT key uni fun ann m) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

throwError ∷ e → DefT key uni fun ann m a Source #

catchErrorDefT key uni fun ann m a → (e → DefT key uni fun ann m a) → DefT key uni fun ann m a Source #

MonadReader r m ⇒ MonadReader r (DefT key uni fun ann m) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

askDefT key uni fun ann m r Source #

local ∷ (r → r) → DefT key uni fun ann m a → DefT key uni fun ann m a Source #

reader ∷ (r → a) → DefT key uni fun ann m a Source #

MonadState s m ⇒ MonadState s (DefT key uni fun ann m) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

getDefT key uni fun ann m s Source #

put ∷ s → DefT key uni fun ann m () Source #

state ∷ (s → (a, s)) → DefT key uni fun ann m a Source #

MonadWriter w m ⇒ MonadWriter w (DefT key uni fun ann m) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

writer ∷ (a, w) → DefT key uni fun ann m a Source #

tell ∷ w → DefT key uni fun ann m () Source #

listenDefT key uni fun ann m a → DefT key uni fun ann m (a, w) Source #

passDefT key uni fun ann m (a, w → w) → DefT key uni fun ann m a Source #

MonadTrans (DefT key uni fun ann) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

liftMonad m ⇒ m a → DefT key uni fun ann m a Source #

Monad m ⇒ Applicative (DefT key uni fun ann m) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

pure ∷ a → DefT key uni fun ann m a Source #

(<*>)DefT key uni fun ann m (a → b) → DefT key uni fun ann m a → DefT key uni fun ann m b Source #

liftA2 ∷ (a → b → c) → DefT key uni fun ann m a → DefT key uni fun ann m b → DefT key uni fun ann m c Source #

(*>)DefT key uni fun ann m a → DefT key uni fun ann m b → DefT key uni fun ann m b Source #

(<*)DefT key uni fun ann m a → DefT key uni fun ann m b → DefT key uni fun ann m a Source #

Functor m ⇒ Functor (DefT key uni fun ann m) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

fmap ∷ (a → b) → DefT key uni fun ann m a → DefT key uni fun ann m b Source #

(<$) ∷ a → DefT key uni fun ann m b → DefT key uni fun ann m a Source #

Monad m ⇒ Monad (DefT key uni fun ann m) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

(>>=)DefT key uni fun ann m a → (a → DefT key uni fun ann m b) → DefT key uni fun ann m b Source #

(>>)DefT key uni fun ann m a → DefT key uni fun ann m b → DefT key uni fun ann m b Source #

return ∷ a → DefT key uni fun ann m a Source #

MonadQuote m ⇒ MonadQuote (DefT key uni fun ann m) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

liftQuoteQuote a → DefT key uni fun ann m a Source #

class (Monad m, Ord key) ⇒ MonadDefs key uni fun ann m | m → key uni fun ann where Source #

Minimal complete definition

Nothing

Methods

liftDefDefT key uni fun ann Identity a → m a Source #

default liftDef ∷ (MonadDefs key uni fun ann n, MonadTrans t, t n ~ m) ⇒ DefT key uni fun ann Identity a → m a Source #

Instances

Instances details
MonadDefs key uni fun ann m ⇒ MonadDefs key uni fun ann (ExceptT e m) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

liftDefDefT key uni fun ann Identity a → ExceptT e m a Source #

MonadDefs key uni fun ann m ⇒ MonadDefs key uni fun ann (ReaderT r m) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

liftDefDefT key uni fun ann Identity a → ReaderT r m a Source #

MonadDefs key uni fun ann m ⇒ MonadDefs key uni fun ann (StateT s m) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

liftDefDefT key uni fun ann Identity a → StateT s m a Source #

(Ord key, Monad m) ⇒ MonadDefs key uni fun ann (DefT key uni fun ann m) Source # 
Instance details

Defined in PlutusIR.Compiler.Definitions

Methods

liftDefDefT key uni fun ann Identity a → DefT key uni fun ann m a Source #

type TermDefWithStrictness uni fun ann = Def (VarDecl TyName Name uni ann) (Term TyName Name uni fun ann, Strictness) Source #

runDefT ∷ (Monad m, Ord key) ⇒ ann → DefT key uni fun ann m (Term TyName Name uni fun ann) → m (Term TyName Name uni fun ann) Source #

defineTermMonadDefs key uni fun ann m ⇒ key → TermDefWithStrictness uni fun ann → Set key → m () Source #

modifyTermDefMonadDefs key uni fun ann m ⇒ key → (TermDefWithStrictness uni fun ann → TermDefWithStrictness uni fun ann) → m () Source #

defineTypeMonadDefs key uni fun ann m ⇒ key → TypeDef TyName uni ann → Set key → m () Source #

modifyTypeDefMonadDefs key uni fun ann m ⇒ key → (TypeDef TyName uni ann → TypeDef TyName uni ann) → m () Source #

defineDatatype ∷ ∀ key uni fun ann m. MonadDefs key uni fun ann m ⇒ key → DatatypeDef TyName Name uni ann → Set key → m () Source #

modifyDatatypeDefMonadDefs key uni fun ann m ⇒ key → (DatatypeDef TyName Name uni ann → DatatypeDef TyName Name uni ann) → m () Source #

modifyDepsMonadDefs key uni fun ann m ⇒ key → (Set key → Set key) → m () Source #

Modifies the dependency set of a key.

recordAlias ∷ ∀ key uni fun ann m. MonadDefs key uni fun ann m ⇒ key → m () Source #

lookupTermMonadDefs key uni fun ann m ⇒ ann → key → m (Maybe (Term TyName Name uni fun ann)) Source #

lookupOrDefineTermMonadDefs key uni fun ann m ⇒ ann → key → m (TermDefWithStrictness uni fun ann, Set key) → m (Term TyName Name uni fun ann) Source #

lookupTypeMonadDefs key uni fun ann m ⇒ ann → key → m (Maybe (Type TyName uni ann)) Source #

lookupOrDefineTypeMonadDefs key uni fun ann m ⇒ ann → key → m (TypeDef TyName uni ann, Set key) → m (Type TyName uni ann) Source #

lookupConstructorsMonadDefs key uni fun ann m ⇒ ann → key → m (Maybe [Term TyName Name uni fun ann]) Source #

lookupDestructor ∷ ∀ key uni fun ann m. MonadDefs key uni fun ann m ⇒ ann → key → m (Maybe (Term TyName Name uni fun ann)) Source #