| 
4 | 4 | module Tests.Orphans where  | 
5 | 5 | 
 
  | 
6 | 6 | #if !(MIN_VERSION_base(4,7,0))  | 
 | 7 | +import Control.Monad.Trans.Maybe (MaybeT)  | 
7 | 8 | import Data.Typeable.Internal  | 
8 | 9 | import Data.Functor.Compose (Compose)  | 
9 | 10 | import Data.Functor.Product (Product)  | 
 | 11 | +import Data.Functor.Sum (Sum)  | 
 | 12 | +import Data.Functor.These (These1)  | 
10 | 13 | 
 
  | 
11 | 14 | instance (Typeable1 f, Typeable1 g) => Typeable1 (Product f g) where  | 
12 | 15 |     typeOf1 _ = mkTyConApp  | 
13 | 16 |         (mkTyCon3 "transformers" "Data.Functor.Product" "Product")  | 
14 | 17 |         [typeOf1 (undefined :: f ()), typeOf1 (undefined :: f ())]  | 
15 | 18 | 
 
  | 
 | 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 | + | 
16 | 29 | instance (Typeable1 f, Typeable1 g) => Typeable1 (Compose f g) where  | 
17 | 30 |     typeOf1 _ = mkTyConApp  | 
18 | 31 |         (mkTyCon3 "transformers" "Data.Functor.Compose" "Compose")  | 
19 | 32 |         [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 ())]  | 
20 | 38 | #endif  | 
0 commit comments