Safe HaskellNone



Unittest helpers for TemplateHaskell components.



case2Pfx :: StringSource

simplifyName :: String -> String -> StringSource

runProp :: Testable prop => String -> prop -> TestSource

runCase :: String -> Assertion -> TestSource

run :: Name -> Q ExpSource

mapSlashes :: String -> StringSource

testSuite :: String -> [Name] -> Q [Dec]Source

Builds a test suite.

mkConsArbitrary :: (Name, [a]) -> ExpSource

conInfo :: Con -> (Name, [Type])Source

mkRegularArbitrary :: Name -> [Con] -> Q [Dec]Source

genArbitrary :: Name -> Q [Dec]Source

Builds a default Arbitrary instance for a type. This requires that all members are of types that already have Arbitrary instances, and that the arbitrary instances are well behaved (w.r.t. recursive data structures, or similar concerns). In that sense, this is not appropriate for all data types, just those that are simple but very repetitive or have many simple fields.