aboutsummaryrefslogtreecommitdiff
path: root/Haskell-book/17/Exercises/test/Spec.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Haskell-book/17/Exercises/test/Spec.hs')
-rw-r--r--Haskell-book/17/Exercises/test/Spec.hs26
1 files changed, 26 insertions, 0 deletions
diff --git a/Haskell-book/17/Exercises/test/Spec.hs b/Haskell-book/17/Exercises/test/Spec.hs
new file mode 100644
index 0000000..e1405c5
--- /dev/null
+++ b/Haskell-book/17/Exercises/test/Spec.hs
@@ -0,0 +1,26 @@
+import Data.Monoid
+import Exercises
+import Test.QuickCheck.Checkers
+import Test.QuickCheck.Classes
+
+main :: IO ()
+main = do
+ quickBatch $ functor $ Pair ('a', 'b', 'c') ('d', 'e', 'f')
+ quickBatch $ applicative $ Pair ('a', 'b', 'c') ('d', 'e', 'f')
+ quickBatch $ functor $ Two ('a', 'b', 'c') (1 :: Integer, 2 :: Integer, 3 :: Integer)
+ quickBatch $ applicative $ Two (Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
+ (Sum (1 :: Integer), Sum (2 :: Integer), Sum (3 :: Integer))
+ quickBatch $ applicative $ Three (Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
+ (Sum (1 :: Integer), Sum (2 :: Integer), Sum (3 :: Integer))
+ (Sum (4 :: Integer), Sum (5 :: Integer), Sum (6 :: Integer))
+ quickBatch $ applicative $ Three' (Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
+ (Sum (1 :: Integer), Sum (2 :: Integer), Sum (3 :: Integer))
+ (Sum (4 :: Integer), Sum (5 :: Integer), Sum (6 :: Integer))
+ quickBatch $ applicative $ Four (Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
+ (Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
+ (Sum (1 :: Integer), Sum (2 :: Integer), Sum (3 :: Integer))
+ (Sum (4 :: Integer), Sum (5 :: Integer), Sum (6 :: Integer))
+ quickBatch $ applicative $ Four (Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
+ (Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
+ (Product (1 :: Integer), Product (2 :: Integer), Product (3 :: Integer))
+ (Sum (4 :: Integer), Sum (5 :: Integer), Sum (6 :: Integer))