Testsuite error message changes
[ghc.git] / testsuite / tests / typecheck / should_compile / tc231.hs
1 {-# OPTIONS_GHC -ddump-types -dsuppress-module-prefixes #-}
2 {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts #-}
3
4 -- See Trac #1456
5
6 -- The key thing here is that foo should get the type
7 -- foo :: forall b s t1. (Zork s (Z [Char]) b)
8 -- => Q s (Z [Char]) t1 -> ST s ()
9
10 -- Note the quantification over 'b', which was previously
11 -- omitted; see Note [Important subtlety in oclose] in FunDeps
12
13
14 module ShouldCompile where
15
16 import GHC.ST
17
18 data Q s a chain = Node s a chain
19
20 data Z a = Z a
21
22 s :: Q t (Z [Char]) t1 -> Q t (Z [Char]) t1
23 s = undefined
24
25 class Zork s a b | a -> b where
26 huh :: Q s a chain -> ST s ()
27
28 foo b = huh (s b)
29