plutus-core-1.0.0.1: Language library for Plutus Core
Safe HaskellNone
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

get :: NormalizeTypeT m tyname uni ann s

put :: s -> NormalizeTypeT m tyname uni ann ()

state :: (s -> (a, s)) -> NormalizeTypeT m tyname uni ann a

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 #

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 #

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 #

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

Defined in PlutusCore.Normalize.Internal

Methods

empty :: NormalizeTypeT 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 #

some :: NormalizeTypeT m tyname uni ann a -> NormalizeTypeT m tyname uni ann [a] Source #

many :: NormalizeTypeT m tyname uni ann 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

mzero :: NormalizeTypeT m tyname uni ann a Source #

mplus :: NormalizeTypeT 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

liftQuote :: Quote a -> NormalizeTypeT m tyname uni ann a Source #

runNormalizeTypeM :: NormalizeTypeT m tyname uni ann a -> m a Source #

Run a NormalizeTypeM 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 NormalizeTypeM computation.

normalizeTypeM :: (HasUnique tyname TypeUnique, MonadQuote m, HasUniApply uni) => Type tyname uni ann -> NormalizeTypeT m tyname uni ann (Normalized (Type tyname uni ann)) Source #

Normalize a Type in the NormalizeTypeM monad.

substNormalizeTypeM Source #

Arguments

:: (HasUnique tyname TypeUnique, MonadQuote m, HasUniApply uni) 
=> 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 NormalizeTypeM monad.

normalizeTypesInM :: (HasUnique tyname TypeUnique, MonadQuote m, HasUniApply uni) => Term tyname name uni fun ann -> NormalizeTypeT m tyname uni ann (Term tyname name uni fun ann) Source #

Normalize every Type in a Term.