summaryrefslogtreecommitdiff
path: root/src/Tests/Arbitrary.hs
diff options
context:
space:
mode:
authorKiwamu Okabe <kiwamu@debian.or.jp>2012-02-28 01:49:16 +0900
committerKiwamu Okabe <kiwamu@debian.or.jp>2012-02-28 01:49:16 +0900
commitb27a86d9758512d85d052a9a46917a54eb3da035 (patch)
tree43171a5211b250025cc85e6994a6a516aad5668f /src/Tests/Arbitrary.hs
parent6ac52ff209b172129452cd464d840b3c73c85c01 (diff)
Imported Upstream version 1.9.1.1
Diffstat (limited to 'src/Tests/Arbitrary.hs')
-rw-r--r--src/Tests/Arbitrary.hs10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/Tests/Arbitrary.hs b/src/Tests/Arbitrary.hs
index f5a44ceab..9d65e1f1f 100644
--- a/src/Tests/Arbitrary.hs
+++ b/src/Tests/Arbitrary.hs
@@ -1,5 +1,5 @@
{-# OPTIONS_GHC -fno-warn-orphans #-}
-{-# LANGUAGE TypeSynonymInstances #-}
+{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, ScopedTypeVariables #-}
-- provides Arbitrary instance for Pandoc types
module Tests.Arbitrary ()
where
@@ -22,10 +22,10 @@ arbAttr = do
return (id',classes,keyvals)
instance Arbitrary Inlines where
- arbitrary = liftM fromList arbitrary
+ arbitrary = liftM (fromList :: [Inline] -> Inlines) arbitrary
instance Arbitrary Blocks where
- arbitrary = liftM fromList arbitrary
+ arbitrary = liftM (fromList :: [Block] -> Blocks) arbitrary
instance Arbitrary Inline where
arbitrary = resize 3 $ arbInline 2
@@ -41,10 +41,6 @@ arbInline :: Int -> Gen Inline
arbInline n = frequency $ [ (60, liftM Str realString)
, (60, return Space)
, (10, liftM2 Code arbAttr realString)
- , (5, return EmDash)
- , (5, return EnDash)
- , (5, return Apostrophe)
- , (5, return Ellipses)
, (5, elements [ RawInline "html" "<a id=\"eek\">"
, RawInline "latex" "\\my{command}" ])
] ++ [ x | x <- nesters, n > 1]