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