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

PlutusCore.Normalize.Internal

Description

The internals of the normalizer.

Synopsis

Documentation

data NormalizeTypeT m tyname uni ann a Source #

The monad transformer that type normalization runs in.

Instances

Instances details
MonadState s m ⇒ MonadState s (NormalizeTypeT m tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Normalize.Internal

Methods

getNormalizeTypeT m tyname uni ann s Source #

put ∷ s → NormalizeTypeT m tyname uni ann () Source #

state ∷ (s → (a, s)) → NormalizeTypeT m tyname uni ann a Source #

Alternative m ⇒ Alternative (NormalizeTypeT m tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Normalize.Internal

Methods

emptyNormalizeTypeT m tyname uni ann a Source #

(<|>)NormalizeTypeT m tyname uni ann a → NormalizeTypeT m tyname uni ann a → NormalizeTypeT m tyname uni ann a Source #

someNormalizeTypeT m tyname uni ann a → NormalizeTypeT m tyname uni ann [a] Source #

manyNormalizeTypeT m tyname uni ann a → NormalizeTypeT m tyname uni ann [a] Source #

Applicative m ⇒ Applicative (NormalizeTypeT m tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Normalize.Internal

Methods

pure ∷ a → NormalizeTypeT m tyname uni ann a Source #

(<*>)NormalizeTypeT m tyname uni ann (a → b) → NormalizeTypeT m tyname uni ann a → NormalizeTypeT m tyname uni ann b Source #

liftA2 ∷ (a → b → c) → NormalizeTypeT m tyname uni ann a → NormalizeTypeT m tyname uni ann b → NormalizeTypeT m tyname uni ann c Source #

(*>)NormalizeTypeT m tyname uni ann a → NormalizeTypeT m tyname uni ann b → NormalizeTypeT m tyname uni ann b Source #

(<*)NormalizeTypeT m tyname uni ann a → NormalizeTypeT m tyname uni ann b → NormalizeTypeT m tyname uni ann a Source #

Functor m ⇒ Functor (NormalizeTypeT m tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Normalize.Internal

Methods

fmap ∷ (a → b) → NormalizeTypeT m tyname uni ann a → NormalizeTypeT m tyname uni ann b Source #

(<$) ∷ a → NormalizeTypeT m tyname uni ann b → NormalizeTypeT m tyname uni ann a Source #

Monad m ⇒ Monad (NormalizeTypeT m tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Normalize.Internal

Methods

(>>=)NormalizeTypeT m tyname uni ann a → (a → NormalizeTypeT m tyname uni ann b) → NormalizeTypeT m tyname uni ann b Source #

(>>)NormalizeTypeT m tyname uni ann a → NormalizeTypeT m tyname uni ann b → NormalizeTypeT m tyname uni ann b Source #

return ∷ a → NormalizeTypeT m tyname uni ann a Source #

MonadPlus m ⇒ MonadPlus (NormalizeTypeT m tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Normalize.Internal

Methods

mzeroNormalizeTypeT m tyname uni ann a Source #

mplusNormalizeTypeT m tyname uni ann a → NormalizeTypeT m tyname uni ann a → NormalizeTypeT m tyname uni ann a Source #

MonadQuote m ⇒ MonadQuote (NormalizeTypeT m tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Normalize.Internal

Methods

liftQuoteQuote a → NormalizeTypeT m tyname uni ann a Source #

type MonadNormalizeType uni m = (MonadQuote m, HasUniApply uni) Source #

The constraints that type normalization requires.

runNormalizeTypeTNormalizeTypeT m tyname uni ann a → m a Source #

Run a NormalizeTypeT computation.

withExtendedTypeVarEnv ∷ (HasUnique tyname TypeUnique, Monad m) ⇒ tyname → Normalized (Type tyname uni ann) → NormalizeTypeT m tyname uni ann a → NormalizeTypeT m tyname uni ann a Source #

Locally extend a TypeVarEnv in a NormalizeTypeT computation.

normalizeTypeM ∷ (HasUnique tyname TypeUnique, MonadNormalizeType uni m) ⇒ Type tyname uni ann → NormalizeTypeT m tyname uni ann (Normalized (Type tyname uni ann)) Source #

Normalize a Type in the NormalizeTypeT monad.

substNormalizeTypeM Source #

Arguments

∷ (HasUnique tyname TypeUnique, MonadNormalizeType uni m) 
Normalized (Type tyname uni ann)
ty
→ tyname
name
Type tyname uni ann
body
NormalizeTypeT m tyname uni ann (Normalized (Type tyname uni ann))
NORM ([ty / name] body)

Substitute a type for a variable in a type and normalize in the NormalizeTypeT monad.

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

Normalize every Type in a Term.