Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The internals of the normalizer.
Synopsis
- data NormalizeTypeT m tyname uni ann a
- type MonadNormalizeType uni m = (MonadQuote m, HasUniApply uni)
- runNormalizeTypeT :: 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, MonadNormalizeType uni m) => Type tyname uni ann -> NormalizeTypeT m tyname uni ann (Normalized (Type tyname uni ann))
- substNormalizeTypeM :: (HasUnique tyname TypeUnique, MonadNormalizeType uni m) => Normalized (Type tyname uni ann) -> tyname -> Type tyname uni ann -> NormalizeTypeT m tyname uni ann (Normalized (Type tyname uni ann))
- normalizeTypesInM :: (HasUnique tyname TypeUnique, MonadNormalizeType uni m) => 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 # | |
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 # | |
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 # | |
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 # | |
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 # | |
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 # |
type MonadNormalizeType uni m = (MonadQuote m, HasUniApply uni) Source #
The constraints that type normalization requires.
runNormalizeTypeT :: NormalizeTypeT 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.
:: (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 #