plutus-core-1.39.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.Check.Normal

Description

This module makes sure types are normalized inside programs.

Synopsis

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.

isNormalTypeHasUniApply uni ⇒ Type tyname uni ann → Bool Source #

data NormCheckError tyname name uni fun ann Source #

Constructors

BadType !ann !(Type tyname uni ann) !Text 
BadTerm !ann !(Term tyname name uni fun ann) !Text 

Instances

Instances details
(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 # 
Instance details

Defined in PlutusCore.Error

Methods

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 # 
Instance details

Defined in PlutusCore.Error

Methods

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 # 
Instance details

Defined in PlutusCore.Error

Associated Types

type Rep (NormCheckError tyname name uni fun ann) ∷ TypeType Source #

Methods

fromNormCheckError tyname name uni fun ann → Rep (NormCheckError tyname name uni fun ann) x Source #

toRep (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 # 
Instance details

Defined in PlutusCore.Error

Methods

showsPrecIntNormCheckError tyname name uni fun ann → ShowS Source #

showNormCheckError tyname name uni fun ann → String Source #

showList ∷ [NormCheckError tyname name uni fun ann] → ShowS Source #

(NFData tyname, NFData name, Closed uni, Everywhere uni NFData, NFData fun, NFData ann) ⇒ NFData (NormCheckError tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

rnfNormCheckError 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 # 
Instance details

Defined in PlutusCore.Error

Methods

(==)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 # 
Instance details

Defined in PlutusCore.Error

Methods

_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 # 
Instance details

Defined in PlutusCore.Error