Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module makes sure types are normalized inside programs.
Synopsis
- checkProgram :: (AsNormCheckError e tyname name uni fun ann, MonadError e m) => Program tyname name uni fun ann -> m ()
- checkTerm :: (AsNormCheckError e tyname name uni fun ann, MonadError e m) => Term tyname name uni fun ann -> m ()
- isNormalType :: Type tyname uni ann -> Bool
- data NormCheckError tyname name uni fun ann
Documentation
checkProgram :: (AsNormCheckError e tyname name uni fun ann, MonadError e m) => Program tyname name uni fun ann -> m () Source #
Ensure that all types in the Program
are normalized.
checkTerm :: (AsNormCheckError e tyname name uni fun ann, MonadError e m) => Term tyname name uni fun ann -> m () Source #
Ensure that all types in the Term
are normalized.
isNormalType :: Type tyname uni ann -> Bool Source #
data NormCheckError tyname name uni fun ann Source #
Instances
(Pretty ann, PrettyBy config (Type tyname uni ann), PrettyBy config (Term tyname name uni fun ann)) => PrettyBy config (NormCheckError tyname name uni fun ann) Source # | |
Defined in PlutusCore.Error prettyBy :: config -> NormCheckError tyname name uni fun ann -> Doc ann0 # prettyListBy :: config -> [NormCheckError tyname name uni fun ann] -> Doc ann0 # | |
Functor (NormCheckError tyname name uni fun) Source # | |
Defined in PlutusCore.Error fmap :: (a -> b) -> NormCheckError tyname name uni fun a -> NormCheckError tyname name uni fun b Source # (<$) :: a -> NormCheckError tyname name uni fun b -> NormCheckError tyname name uni fun a Source # | |
(Eq (Term tyname name uni fun ann), Eq (Type tyname uni ann), GEq uni, Closed uni, Everywhere uni Eq, Eq fun, Eq ann) => Eq (NormCheckError tyname name uni fun ann) Source # | |
Defined in PlutusCore.Error (==) :: NormCheckError tyname name uni fun ann -> NormCheckError tyname name uni fun ann -> Bool Source # (/=) :: NormCheckError tyname name uni fun ann -> NormCheckError tyname name uni fun ann -> Bool Source # | |
(Everywhere uni Show, GShow uni, Closed uni, Show ann, Show tyname, Show name, Show fun) => Show (NormCheckError tyname name uni fun ann) Source # | |
Defined in PlutusCore.Error | |
Generic (NormCheckError tyname name uni fun ann) Source # | |
Defined in PlutusCore.Error from :: NormCheckError tyname name uni fun ann -> Rep (NormCheckError tyname name uni fun ann) x Source # to :: Rep (NormCheckError tyname name uni fun ann) x -> NormCheckError tyname name uni fun ann Source # | |
(Everywhere uni NFData, Closed uni, NFData ann, NFData tyname, NFData name, NFData fun) => NFData (NormCheckError tyname name uni fun ann) Source # | |
Defined in PlutusCore.Error rnf :: NormCheckError tyname name uni fun ann -> () Source # | |
HasErrorCode (NormCheckError _a _b _c _d _e) Source # | |
Defined in PlutusCore.Error errorCode :: NormCheckError _a _b _c _d _e -> ErrorCode Source # | |
AsNormCheckError (NormCheckError tyname name uni fun ann) tyname name uni fun ann Source # | |
Defined in PlutusCore.Error _NormCheckError :: Prism' (NormCheckError tyname name uni fun ann) (NormCheckError tyname name uni fun ann) Source # _BadType :: Prism' (NormCheckError tyname name uni fun ann) (ann, Type tyname uni ann, Text) Source # _BadTerm :: Prism' (NormCheckError tyname name uni fun ann) (ann, Term tyname name uni fun ann, Text) Source # | |
type Rep (NormCheckError tyname name uni fun ann) Source # | |
Defined in PlutusCore.Error type Rep (NormCheckError tyname name uni fun ann) = D1 ('MetaData "NormCheckError" "PlutusCore.Error" "plutus-core-1.0.0.1-6wMiyL0yerXJu56t8zBoKx" 'False) (C1 ('MetaCons "BadType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :+: C1 ('MetaCons "BadTerm" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term tyname name uni fun ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) |