packages feed

leancheck 0.4.0 → 0.4.1

raw patch · 3 files changed

+54/−4 lines, 3 filesdep ~template-haskell

Dependency ranges changed: template-haskell

Files

+ TODO.md view
@@ -0,0 +1,33 @@+TO DO list for LeanCheck+========================++List of things to do for LeanCheck.+++documentation+-------------++* add eg folder with some examples of testing using LeanCheck;++* on tutorial.md, write about how to create test programs;++* on data-invariant.md, write missing section;++* update documentation of `T.LC.Function.*`, mark done/stub/experimental modules;++* review Haddock of all public modules++* find a way to fix links on hackage's README rendering+  (absolute links to github?)+++v0.4.1+------++* rework LeanCheck.Tiers module (simply bagsOf and setsOf);+++v0.4.2+------++* implement stub `Test.LeanCheck.Function.*` modules;
leancheck.cabal view
@@ -11,7 +11,7 @@ -- this cabal file too complicated.  -- Rudy  name:                leancheck-version:             0.4.0+version:             0.4.1 synopsis:            Cholesterol-free property-based testing description:   LeanCheck is a simple enumerative property-based testing library.@@ -37,9 +37,10 @@  extra-doc-files: README.md                , CREDITS.md+               , TODO.md                , doc/data-invariant.md                , doc/tutorial.md-tested-with: GHC==7.10, GHC==7.8, GHC==7.6, GHC==7.4+tested-with: GHC==8.0, GHC==7.10, GHC==7.8, GHC==7.6, GHC==7.4   source-repository head@@ -49,7 +50,7 @@ source-repository this   type:            git   location:        https://github.com/rudymatela/leancheck-  tag:             v0.4.0+  tag:             v0.4.1  library   exposed-modules: Test.LeanCheck
src/Test/LeanCheck/Derive.hs view
@@ -1,7 +1,8 @@ {-# LANGUAGE TemplateHaskell, CPP #-} -- Experimental module for deriving Listable instances ----- Needs GHC and Template Haskell (tested on GHC 7.4, 7.6, 7.8 and 7.10)+-- Needs GHC and Template Haskell+-- (tested on GHC 7.4, 7.6, 7.8, 7.10 and 8.0) module Test.LeanCheck.Derive   ( deriveListable   )@@ -126,8 +127,13 @@ typeArity t = do   ti <- reify t   return . length $ case ti of+#if __GLASGOW_HASKELL__ < 800     TyConI (DataD    _ _ ks _ _) -> ks     TyConI (NewtypeD _ _ ks _ _) -> ks+#else+    TyConI (DataD    _ _ ks _ _ _) -> ks+    TyConI (NewtypeD _ _ ks _ _ _) -> ks+#endif     _                            -> error $ "error (arity): symbol "                                          ++ show t                                          ++ " is not a newtype or data"@@ -138,8 +144,13 @@ typeCons t = do   ti <- reify t   return . map simplify $ case ti of+#if __GLASGOW_HASKELL__ < 800     TyConI (DataD    _ _ _ cs _) -> cs     TyConI (NewtypeD _ _ _ c  _) -> [c]+#else+    TyConI (DataD    _ _ _ _ cs _) -> cs+    TyConI (NewtypeD _ _ _ _ c  _) -> [c]+#endif     _ -> error $ "error (typeConstructors): symbol "               ++ show t               ++ " is neither newtype nor data"@@ -154,5 +165,10 @@ (|=>|) :: Cxt -> DecsQ -> DecsQ c |=>| qds = do ds <- qds                 return $ map (`ac` c) ds+#if __GLASGOW_HASKELL__ < 800   where ac (InstanceD c ts ds) c' = InstanceD (c++c') ts ds         ac d                   _  = d+#else+  where ac (InstanceD o c ts ds) c' = InstanceD o (c++c') ts ds+        ac d                     _  = d+#endif