testsuite: Assert that testsuite ways are known
[ghc.git] / testsuite / tests / typecheck / should_compile / T11379.hs
1 {-# LANGUAGE ExistentialQuantification, RankNTypes, MultiParamTypeClasses,
2 FunctionalDependencies, FlexibleInstances, FlexibleContexts
3 #-}
4
5 module XMonad.Layout.MultiToggle where
6
7 import Data.Typeable
8
9 -- This appears to be the culprit
10 expand :: (HList ts a) => MultiToggleS ts l a -> MultiToggle ts l a
11 expand (MultiToggleS b ts) =
12 resolve ts id
13 (\x mt -> let g = transform' x in mt{ currLayout = g $ currLayout mt })
14 (MultiToggle (EL b id) ts)
15
16 class (Typeable t) => Transformer t a | t -> a where
17 transform :: t
18 -> l a
19 -> (forall l'. l' a -> (l' a -> l a) -> b)
20 -> b
21
22 data EL l a = forall l'. EL (l' a) (l' a -> l a)
23
24 transform' :: (Transformer t a) => t -> EL l a -> EL l a
25 transform' t (EL l det) = undefined
26
27 data MultiToggleS ts l a = MultiToggleS (l a) ts
28 deriving (Read, Show)
29
30 data MultiToggle ts l a = MultiToggle{
31 currLayout :: EL l a,
32 transformers :: ts
33 }
34
35 class HList c a where
36 resolve :: c -> b -> (forall t. (Transformer t a) => t -> b) -> b