Remove the type-checking knot.
[ghc.git] / testsuite / tests / polykinds / T13555.hs
1 {-# LANGUAGE FlexibleContexts #-}
2 {-# LANGUAGE InstanceSigs #-}
3 {-# LANGUAGE MonoLocalBinds #-}
4 {-# LANGUAGE MultiParamTypeClasses #-}
5 {-# LANGUAGE PolyKinds #-}
6 {-# LANGUAGE RankNTypes #-}
7 module T13555 where
8
9 import Data.Functor.Identity (Identity(..))
10
11 data T a
12 type Polynomial a = T a
13 newtype GF fp d = GF (Polynomial fp)
14 type CRTInfo r = (Int -> r, r)
15 type Tagged s b = TaggedT s Identity b
16 newtype TaggedT s m b = TagT { untagT :: m b }
17
18 class Reflects a i where
19 value :: Tagged a i
20
21 class CRTrans mon r where
22 crtInfo :: Reflects m Int => TaggedT m mon (CRTInfo r)
23
24 instance CRTrans Maybe (GF fp d) where
25 crtInfo :: forall m . (Reflects m Int) => TaggedT m Maybe (CRTInfo (GF fp d))
26 crtInfo = undefined