fitspec 0.2.1 → 0.2.2
raw patch · 3 files changed
+39/−3 lines, 3 files
Files
- FitSpec/Derive.hs +12/−1
- TODO.md +23/−0
- fitspec.cabal +4/−2
FitSpec/Derive.hs view
@@ -1,6 +1,7 @@ -- | Experimental module for deriving Mutable 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) -- -- Despite Mutable instances being actually very simple, this module can be -- used to derive those. However, it will not work on all cases: when that@@ -144,8 +145,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"@@ -157,5 +163,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
+ TODO.md view
@@ -0,0 +1,23 @@+TO DO list for FitSpec+======================++misc+----++* (?) announce on mailing list (wait for Haddock to be ready)+++documentation+-------------++* add second simple/minimal example in eg+ (unbalanced binary search tree? stack?);++* write detailed install instructions on INSTALL.md+ (cabal install, cabal from sandbox, source include)+++v0.3+----++* (?) rename FitSpec to Test.FitSpec
fitspec.cabal view
@@ -1,5 +1,5 @@ name: fitspec-version: 0.2.1+version: 0.2.2 synopsis: refining property sets for testing Haskell programs description: FitSpec provides automated assistance in the task of refining test properties@@ -26,8 +26,10 @@ extra-doc-files: README.md , CREDITS.md+ , TODO.md , doc/modules.md , doc/tutorial-property-creation.md+tested-with: GHC==8.0, GHC==7.10, GHC==7.8, GHC==7.6, GHC==7.4 source-repository head type: git@@ -36,7 +38,7 @@ source-repository this type: git location: https://github.com/rudymatela/fitspec- tag: v0.2.1+ tag: v0.2.2 library