|
1 | | -{-# LANGUAGE CPP #-} |
2 | 1 | {-# LANGUAGE FlexibleInstances #-} |
3 | 2 | {-# LANGUAGE GADTs #-} |
4 | 3 | {-# LANGUAGE ImportQualifiedPost #-} |
|
7 | 6 | {-# LANGUAGE StandaloneDeriving #-} |
8 | 7 | {-# LANGUAGE TypeApplications #-} |
9 | 8 | {-# LANGUAGE TypeOperators #-} |
10 | | --- Arbitrary NonEmpty |
11 | | --- TOOD: fixme by bumping QuickCheck to 3.0 when it's released |
12 | | -{-# OPTIONS_GHC -Wno-orphans #-} |
13 | 9 |
|
14 | 10 | -- | This is a collection of relatively core concepts that are re-used |
15 | 11 | -- throughout the codebase. |
@@ -40,12 +36,6 @@ import Data.Set (Set) |
40 | 36 | import Data.Set qualified as Set |
41 | 37 | import Data.Typeable |
42 | 38 |
|
43 | | --- Orphan instance for old QuickCheck versions |
44 | | -#if !MIN_VERSION_QuickCheck(2, 17, 0) |
45 | | -import Data.List.NonEmpty qualified as NE |
46 | | -import Test.QuickCheck (Arbitrary (..), NonEmptyList (NonEmpty)) |
47 | | -#endif |
48 | | - |
49 | 39 | -- Variables -------------------------------------------------------------- |
50 | 40 |
|
51 | 41 | -- | Typed, optionally named, variables |
@@ -140,9 +130,3 @@ instance Typeable c => Show (Evidence c) where |
140 | 130 | unionWithMaybe :: (a -> a -> a) -> Maybe a -> Maybe a -> Maybe a |
141 | 131 | unionWithMaybe f ma ma' = (f <$> ma <*> ma') <|> ma <|> ma' |
142 | 132 |
|
143 | | -#if !MIN_VERSION_QuickCheck(2, 17, 0) |
144 | | -instance Arbitrary a => Arbitrary (NonEmpty a) where |
145 | | - arbitrary = do |
146 | | - NonEmpty xs <- arbitrary |
147 | | - pure (NE.fromList xs) |
148 | | -#endif |
0 commit comments