Skip to content

Commit a7889a3

Browse files
committed
Fix ancient GHC
1 parent 6c8814c commit a7889a3

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

semialign/src/Data/Crosswalk.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ module Data.Crosswalk (
88
Bicrosswalk (..),
99
) where
1010

11-
import Control.Applicative (Applicative (pure, (<*>)), (<$>))
11+
import Control.Applicative (Applicative (pure, (<*>)), (<$>), Const(..))
1212
import Control.Monad.Trans.Maybe (MaybeT (..))
1313
import Data.Bifoldable (Bifoldable (..))
1414
import Data.Bifunctor (Bifunctor (..))
1515
import Data.Foldable (Foldable (..))
1616
import Data.Functor.Compose (Compose (..))
17-
import Data.Functor.Const (Const (..))
1817
import Data.Functor.Identity (Identity (..))
1918
import Data.Functor.Sum (Sum (..))
2019
import Data.Functor.These (These1 (..))

these-tests/test/Tests/Crosswalk.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ module Tests.Crosswalk (crosswalkProps) where
66
import Prelude ()
77
import Prelude.Compat
88

9+
import Control.Applicative (Const)
910
import Control.Monad.Trans.Instances ()
1011
import Control.Monad.Trans.Maybe (MaybeT)
1112
import Data.Functor.Compose (Compose (..))
12-
import Data.Functor.Const (Const)
1313
import Data.Functor.Identity (Identity (..))
1414
import Data.Functor.Sum (Sum)
1515
import Data.Functor.These (These1)

these-tests/test/Tests/Orphans.hs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,35 @@
44
module Tests.Orphans where
55

66
#if !(MIN_VERSION_base(4,7,0))
7+
import Control.Monad.Trans.Maybe (MaybeT)
78
import Data.Typeable.Internal
89
import Data.Functor.Compose (Compose)
910
import Data.Functor.Product (Product)
11+
import Data.Functor.Sum (Sum)
12+
import Data.Functor.These (These1)
1013

1114
instance (Typeable1 f, Typeable1 g) => Typeable1 (Product f g) where
1215
typeOf1 _ = mkTyConApp
1316
(mkTyCon3 "transformers" "Data.Functor.Product" "Product")
1417
[typeOf1 (undefined :: f ()), typeOf1 (undefined :: f ())]
1518

19+
instance (Typeable1 f, Typeable1 g) => Typeable1 (Sum f g) where
20+
typeOf1 _ = mkTyConApp
21+
(mkTyCon3 "transformers" "Data.Functor.Sum" "Sum")
22+
[typeOf1 (undefined :: f ()), typeOf1 (undefined :: f ())]
23+
24+
instance (Typeable1 f, Typeable1 g) => Typeable1 (These1 f g) where
25+
typeOf1 _ = mkTyConApp
26+
(mkTyCon3 "these" "Data.Functor.These" "These1")
27+
[typeOf1 (undefined :: f ()), typeOf1 (undefined :: f ())]
28+
1629
instance (Typeable1 f, Typeable1 g) => Typeable1 (Compose f g) where
1730
typeOf1 _ = mkTyConApp
1831
(mkTyCon3 "transformers" "Data.Functor.Compose" "Compose")
1932
[typeOf1 (undefined :: f ()), typeOf1 (undefined :: f ())]
33+
34+
instance Typeable1 f => Typeable1 (MaybeT f) where
35+
typeOf1 _ = mkTyConApp
36+
(mkTyCon3 "transformers" "Control.Monad.Trans.Maybe" "MaybeT")
37+
[typeOf1 (undefined :: f ())]
2038
#endif

0 commit comments

Comments
 (0)