packages feed

th-instance-reification 0.1.2 → 0.1.3

raw patch · 4 files changed

+49/−10 lines, 4 filesdep −QuickCheck-GenTdep ~HTF

Dependencies removed: QuickCheck-GenT

Dependency ranges changed: HTF

Files

src/HTFTestSuite.hs view
@@ -4,11 +4,12 @@ import THInstanceReification.Prelude.Basic import THInstanceReification.Prelude.TH import THInstanceReification+import HTFTestSuite.Prerequisites + main = htfMain $ htf_thisModulesTests  -data A = A  test_existingInstance = do   assertBool $ read $( do@@ -24,10 +25,6 @@       stringE $ show $ r     ) --class MultiParamClass a b c-instance (Eq a) => MultiParamClass a Int Char- test_existingInstanceOnMultiParamClass = do   assertBool $ read $( do       int <- [t|Int|]@@ -42,3 +39,33 @@       a <- [t|A|]       stringE . show =<< isProperInstance ''MultiParamClass [a, int, char]     )+++test_compositeTypes = do+  assertBool $ read $( do+      t <- [t|(Int, Char, Char)|]+      stringE . show =<< isProperInstance ''Show [t]+    )++test_compositeTypesMultiParam = do+  assertBool $ read $( do+      t <- [t|(Int, Char, Char)|]+      int <- [t|Int|]+      char <- [t|Char|]+      stringE . show =<< isProperInstance ''MultiParamClass [t, int, char]+    )+++test_polyTypes = do+  assertBool $ read $( do+      t <- [t|(B Char)|]+      stringE . show =<< isProperInstance ''Show [t]+    )++test_synonyms = do+  assertBool $ read $( do+      t <- [t|C|]+      stringE . show =<< isProperInstance ''Show [t]+    )++
+ src/HTFTestSuite/Prerequisites.hs view
@@ -0,0 +1,11 @@+module HTFTestSuite.Prerequisites where++import Prelude++data A = A+newtype B a = B a deriving (Show)+type C = (B Int, B Char)+++class MultiParamClass a b c+instance (Eq a) => MultiParamClass a Int Char
src/THInstanceReification/Prelude/Basic.hs view
@@ -44,13 +44,13 @@ import System.IO as Exports (Handle, hClose) import System.IO.Error as Exports import Unsafe.Coerce as Exports-import GHC.Exts as Exports hiding (Any, traceEvent)+import GHC.Exts as Exports hiding (Any, traceEvent, traceM, toList) import GHC.Generics as Exports (Generic) import GHC.IO.Exception as Exports import Data.IORef as Exports import Data.STRef as Exports import Control.Monad.ST as Exports-import Debug.Trace as Exports+import Debug.Trace as Exports hiding (traceM)  -- placeholders import Development.Placeholders as Exports
th-instance-reification.cabal view
@@ -1,7 +1,7 @@ name:   th-instance-reification version:-  0.1.2+  0.1.3 synopsis:   Fixed versions of instances reification functions description:@@ -100,16 +100,17 @@     src   main-is:               HTFTestSuite.hs+  other-modules:+    HTFTestSuite.Prerequisites   ghc-options:     -threaded     "-with-rtsopts=-N"   build-depends:     -- testing:     quickcheck-instances,-    QuickCheck-GenT == 0.1.*,     QuickCheck,     HUnit,-    HTF == 0.11.*,+    HTF == 0.12.*,     -- data:     containers,     -- debugging: