Pull recent Hadrian changes from upstream
[ghc.git] / testsuite / tests / typecheck / should_compile / FD3.hs
1 {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-}
2
3 -- Trac #1795
4
5 module ShouldCompile where
6
7 data A a = A
8
9 class MkA a b | a -> b where
10 mkA :: a -> A b
11
12 instance MkA a a where
13
14 translate :: (String, a) -> A a
15 translate a = mkA a
16
17 {- From the call to mkA
18
19 [W] MkA alpha beta
20 [W] alpha ~ (String,a)
21 [W] A beta ~ A a
22
23 ==> beta:=a, alpha:=(String,a)
24 -}