Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- convertToEitherString ∷ Either (Error DefaultUni DefaultFun ()) () → Either String ()
- numTestsForPassProp ∷ Int
- runTestPass ∷ (ThrowableBuiltins uni fun, Typecheckable uni fun, Pretty a, Typeable a, Monoid a, Monad m) ⇒ (PirTCConfig uni fun → Pass m tyname name uni fun a) → Term tyname name uni fun a → m (Term tyname name uni fun a)
- testPassProp ∷ Monad m ⇒ (∀ a. m a → a) → (PirTCConfig DefaultUni DefaultFun → Pass m TyName Name DefaultUni DefaultFun ()) → Property
- testPassProp' ∷ ∀ m tyname name a prop. (Monad m, Testable prop) ⇒ a → (Term TyName Name DefaultUni DefaultFun () → Term tyname name DefaultUni DefaultFun a) → (ExceptT (Error DefaultUni DefaultFun a) m () → prop) → (PirTCConfig DefaultUni DefaultFun → Pass m tyname name DefaultUni DefaultFun a) → Property
Documentation
convertToEitherString ∷ Either (Error DefaultUni DefaultFun ()) () → Either String () Source #
numTestsForPassProp ∷ Int Source #
An appropriate number of tests for a compiler pass property, so that we get some decent exploration of the program space. If you also take other arguments, then consider multiplying this up in order to account for the larger space.
runTestPass ∷ (ThrowableBuiltins uni fun, Typecheckable uni fun, Pretty a, Typeable a, Monoid a, Monad m) ⇒ (PirTCConfig uni fun → Pass m tyname name uni fun a) → Term tyname name uni fun a → m (Term tyname name uni fun a) Source #
testPassProp ∷ Monad m ⇒ (∀ a. m a → a) → (PirTCConfig DefaultUni DefaultFun → Pass m TyName Name DefaultUni DefaultFun ()) → Property Source #
Run a Pass
on generated Terms
s, setting up the typechecking config
and throwing errors.
testPassProp' ∷ ∀ m tyname name a prop. (Monad m, Testable prop) ⇒ a → (Term TyName Name DefaultUni DefaultFun () → Term tyname name DefaultUni DefaultFun a) → (ExceptT (Error DefaultUni DefaultFun a) m () → prop) → (PirTCConfig DefaultUni DefaultFun → Pass m tyname name DefaultUni DefaultFun a) → Property Source #
A version of testPassProp
with more control, allowing some pre-processing
of the term, and a more specific "exit" function.