Testsuite: tabs -> spaces [skip ci]
[ghc.git] / testsuite / tests / gadt / T3169.hs
1 {-# LANGUAGE TypeFamilies, ScopedTypeVariables #-}
2 module T3169 where
3
4 import Prelude hiding ( lookup )
5
6 class Key k where
7 type Map k :: * -> *
8 lookup :: k -> Map k elt -> Maybe elt
9
10 instance (Key a, Key b) => Key (a,b) where
11 type Map (a,b) = MP a b
12 lookup (a,b) (m :: Map (a,b) elt)
13 = case lookup a m :: Maybe (Map b elt) of
14 Just (m2 :: Map b elt) -> lookup b m2 :: Maybe elt
15
16 data MP a b elt = MP (Map a (Map b elt))