gdritter repos s-cargot / 5927d9c
Fix warnings in QC module Getty Ritter 6 years ago
1 changed file(s) with 3 addition(s) and 4 deletion(s). Collapse all Expand all
11 {-# LANGUAGE OverloadedStrings #-}
22 {-# LANGUAGE ScopedTypeVariables #-}
3 {-# OPTIONS_GHC -fno-warn-orphans #-}
34
45 module Main where
56
1112 import Data.Text (Text)
1213 import qualified Data.Text as T
1314 import Test.QuickCheck
14 import Test.QuickCheck.Arbitrary
1515 import Text.Parsec (char)
16 import Text.Parsec.Text (Parser)
1716
1817 instance Arbitrary a => Arbitrary (SExpr a) where
1918 arbitrary = sized $ \n ->
2524 elems <- sequence [ resize (n-k) arbitrary
2625 | _ <- [0..k]
2726 ]
28 tail <- oneof [ SAtom <$> arbitrary
27 rest <- oneof [ SAtom <$> arbitrary
2928 , pure SNil
3029 ]
31 pure (foldr SCons tail elems)
30 pure (foldr SCons rest elems)
3231 ]
3332
3433 instance Arbitrary a => Arbitrary (RichSExpr a) where