1 {-# LANGUAGE NoImplicitPrelude #-}
2 {-# LANGUAGE StandaloneDeriving #-}
4 module Parsers.Types where
6 import Gargantext.Prelude
9 import Test.QuickCheck.Instances()
11 import Text.Parsec.Pos
12 import Text.Parsec.Error (ParseError, Message(..), newErrorMessage)
13 import Data.Time.LocalTime (ZonedTime (..))
14 import Data.Eq (Eq(..))
15 deriving instance Eq ZonedTime
17 instance Arbitrary Message where
19 msgContent <- arbitrary
20 oneof $ return <$> [SysUnExpect msgContent
26 instance Arbitrary SourcePos where
31 return $ newPos sn l c
33 instance Arbitrary ParseError where
37 return $ newErrorMessage msg sp