Safe Haskell | None |
---|---|
Language | Haskell2010 |
The internals of the normalizer.
Synopsis
- data NormalizeTypeT m tyname uni ann a
- runNormalizeTypeM :: NormalizeTypeT m tyname uni ann a -> m a
- withExtendedTypeVarEnv :: ( HasUnique tyname TypeUnique , Monad m) => tyname -> Normalized ( Type tyname uni ann) -> NormalizeTypeT m tyname uni ann a -> NormalizeTypeT m tyname uni ann a
- normalizeTypeM :: ( HasUnique tyname TypeUnique , MonadQuote m, HasUniApply uni) => Type tyname uni ann -> NormalizeTypeT m tyname uni ann ( Normalized ( Type tyname uni ann))
- substNormalizeTypeM :: ( HasUnique tyname TypeUnique , MonadQuote m, HasUniApply uni) => Normalized ( Type tyname uni ann) -> tyname -> Type tyname uni ann -> NormalizeTypeT m tyname uni ann ( Normalized ( Type tyname uni ann))
- 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)
Documentation
data NormalizeTypeT m tyname uni ann a Source #
The monad transformer that type normalization runs in.
Instances
MonadState s m => MonadState s ( NormalizeTypeT m tyname uni ann) Source # | |
Defined in PlutusCore.Normalize.Internal get :: NormalizeTypeT 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 # |
|
Monad m => Monad ( NormalizeTypeT m tyname uni ann) Source # | |
Defined in PlutusCore.Normalize.Internal (>>=) :: 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 # | |
Defined in PlutusCore.Normalize.Internal 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 # | |
Defined in PlutusCore.Normalize.Internal 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 # | |
Defined in PlutusCore.Normalize.Internal 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 # | |
Defined in PlutusCore.Normalize.Internal 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 # | |
Defined in PlutusCore.Normalize.Internal 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.
:: ( 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 #