Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module makes sure types are normalized inside programs.
Synopsis
- checkProgram ∷ (AsNormCheckError e tyname name uni fun ann, HasUniApply uni, MonadError e m) ⇒ Program tyname name uni fun ann → m ()
- checkTerm ∷ (AsNormCheckError e tyname name uni fun ann, HasUniApply uni, MonadError e m) ⇒ Term tyname name uni fun ann → m ()
- isNormalType ∷ HasUniApply uni ⇒ Type tyname uni ann → Bool
- data NormCheckError tyname name uni fun ann
Documentation
checkProgram ∷ (AsNormCheckError e tyname name uni fun ann, HasUniApply uni, 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, HasUniApply uni, MonadError e m) ⇒ Term tyname name uni fun ann → m () Source #
Ensure that all types in the Term
are normalized.
isNormalType ∷ HasUniApply uni ⇒ 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 Source # prettyListBy ∷ config → [NormCheckError tyname name uni fun ann] → Doc ann0 Source # | |
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 # | |
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 # | |
(Show tyname, Show name, Closed uni, Everywhere uni Show, Show fun, Show ann, GShow uni) ⇒ Show (NormCheckError tyname name uni fun ann) Source # | |
Defined in PlutusCore.Error | |
(NFData tyname, NFData name, Closed uni, Everywhere uni NFData, NFData fun, NFData ann) ⇒ NFData (NormCheckError tyname name uni fun ann) Source # | |
Defined in PlutusCore.Error rnf ∷ NormCheckError tyname name uni fun ann → () 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 # | |
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.38.0.0-inplace" 'False) (C1 ('MetaCons "BadType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Type tyname uni ann)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) :+: C1 ('MetaCons "BadTerm" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ann) :*: (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Term tyname name uni fun ann)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))) |