Safe Haskell | None |
---|---|
Language | Haskell2010 |
- testMap :: Map String [String]
- mkClassTests :: Name -> Q Exp
- mkSpecializedClassTest :: Type -> Name -> Q Exp
- mkSpecializedClassTests :: Q Type -> [Name] -> Q Exp
- specializeType :: Type -> Type -> Type
- specializeLaw :: Type -> Name -> Q Exp
- mkTest :: Type -> Name -> Q Exp
- mkTests :: Type -> [Name] -> Q Exp
- listExp2Exp :: [Exp] -> Exp
- extractTestStr :: Name -> String
Documentation
testMap :: Map String [String] Source
Ideally, this map would be generated automatically via template haskell. Due to bug #9699, however, we must enter these manually.
mkClassTests :: Name -> Q Exp Source
makes tests for all instances of a class that take no type variables
Given a type and a class, searches "testMap" for all tests for the class; then specializes those tests to test on the given type
mkSpecializedClassTests :: Q Type -> [Name] -> Q Exp Source
Like "mkSpecializedClassTests", but takes a list of classes
replace all variables with a concrete type
creates an expression of the form:
testProperty "testname" (law_Classname_testname :: typeName -> ... -> Bool)
mkTests :: Type -> [Name] -> Q Exp Source
Like "mkTest", but takes a list of laws and returns a list of tests
listExp2Exp :: [Exp] -> Exp Source
extractTestStr :: Name -> String Source