Skip to content

Commit

Permalink
Work around #14918
Browse files Browse the repository at this point in the history
Re #32
  • Loading branch information
RyanGlScott committed Mar 15, 2018
1 parent 958919c commit 5fba638
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/GenericsTypes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import GHC.Exts

import Test.QuickCheck (Arbitrary(..), oneof)

#if __GLASGOW_HASKELL__ < 702
#if __GLASGOW_HASKELL__ == 700 || __GLASGOW_HASKELL__ == 804
import Text.Read.Deriving (deriveRead)
#endif

Expand Down Expand Up @@ -105,11 +105,14 @@ instance Arbitrary a => Arbitrary (Record a) where
, (:%:) <$> arbitrary <*> arbitrary
]

#if __GLASGOW_HASKELL__ >= 702
deriving instance Read a => Read (T# a)
#else
#if __GLASGOW_HASKELL__ == 700
-- Workaround for GHC Trac #5041
$(deriveRead ''T#)
#elif __GLASGOW_HASKELL__ == 804
-- Workaround for GHC Trac #14918
$(deriveRead ''T#)
#else
deriving instance Read a => Read (T# a)
#endif

#if __GLASGOW_HASKELL__ >= 706
Expand Down

0 comments on commit 5fba638

Please sign in to comment.