plutus-core-0.1.0.0: Language library for Plutus Core
Safe HaskellNone
LanguageHaskell2010

PlutusCore.Check.Normal

Description

This module makes sure types are normalized inside programs.

Synopsis

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 #

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 #

(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 #

(Everywhere uni Show, GShow uni, Closed uni, Show ann, Show tyname, Show name, Show fun) => Show (NormCheckError tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

showsPrec :: Int -> NormCheckError tyname name uni fun ann -> ShowS Source #

show :: NormCheckError tyname name uni fun ann -> String Source #

showList :: [NormCheckError tyname name uni fun ann] -> ShowS 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) :: Type -> Type Source #

Methods

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

Defined in PlutusCore.Error

Methods

rnf :: NormCheckError tyname name uni fun ann -> () Source #

HasErrorCode (NormCheckError _a _b _c _d _e) Source # 
Instance details

Defined in PlutusCore.Error

Methods

errorCode :: NormCheckError _a _b _c _d _e -> ErrorCode 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