Browse Source

Fix warnings in QC module

Getty Ritter 6 years ago
parent
commit
5927d9cf47
1 changed files with 3 additions and 4 deletions
  1. 3 4
      test/SCargotQC.hs

+ 3 - 4
test/SCargotQC.hs

@@ -1,5 +1,6 @@
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE ScopedTypeVariables #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-}
 
 module Main where
 
@@ -11,9 +12,7 @@ import           Data.Monoid ((<>))
 import           Data.Text (Text)
 import qualified Data.Text as T
 import           Test.QuickCheck
-import           Test.QuickCheck.Arbitrary
 import           Text.Parsec (char)
-import           Text.Parsec.Text (Parser)
 
 instance Arbitrary a => Arbitrary (SExpr a) where
   arbitrary = sized $ \n ->
@@ -25,10 +24,10 @@ instance Arbitrary a => Arbitrary (SExpr a) where
                       elems <- sequence [ resize (n-k) arbitrary
                                         | _ <- [0..k]
                                         ]
-                      tail <- oneof [ SAtom <$> arbitrary
+                      rest <- oneof [ SAtom <$> arbitrary
                                     , pure SNil
                                     ]
-                      pure (foldr SCons tail elems)
+                      pure (foldr SCons rest elems)
                   ]
 
 instance Arbitrary a => Arbitrary (RichSExpr a) where