Ticket #4174: Testcase.hs

File Testcase.hs, 0.9 KB (added by lilac, 3 years ago)

Testcase reproducing bad error message

Line 
1{-# LANGUAGE TypeFamilies, TypeOperators, EmptyDataDecls #-}
2
3data True
4data False
5
6data Minor1
7
8data GHC6'8 m
9data GHC6'10 m
10
11type family a :<=: b :: {-Bool-}*
12type instance GHC6'10 m1 :<=: GHC6'8 m2 = False
13
14type a :>=: b = b :<=: a
15
16data Way ghcVersion tablesNextToCode profiling threaded
17
18type family GHCVersion way :: {-GHCVersion-} *
19type instance GHCVersion (Way v n p t) = v
20
21type family Threaded way :: {-Bool-} *
22type instance Threaded (Way v n p t) = t
23
24data Field w s t
25data SmStep
26data RtsSpinLock
27
28field :: String -> m (Field w a b)
29field = undefined
30
31type family WayOf (m :: * -> *) :: *
32
33sync_large_objects :: (Monad m, (GHCVersion (WayOf m) :>=: GHC6'10 Minor1) ~ True, Threaded (WayOf m) ~ True) => m (Field (WayOf m) SmStep RtsSpinLock)
34sync_large_objects = field "sync_large_objects"
35
36testcase :: Monad m => m (Field (Way (GHC6'8 minor) n t p) a b)
37testcase = sync_large_objects