[project @ 1999-10-14 07:23:10 by simonpj]
[ghc-hetmet.git] / ghc / tests / rename / should_fail / rnfail020.hs
1 {-# OPTIONS -fglasgow-exts #-}
2
3 -- !!! Error messages with scoped type variables
4
5 module Foo where
6
7 data Set a = Set a
8
9 unionSetB :: Eq a => Set a -> Set a -> Set a
10 unionSetB (s1 :: Set a) s2 = unionSets s1 s2
11  where
12    unionSets :: Eq a => Set a -> Set a -> Set a
13    unionSets a b = a
14
15
16 {- In GHC 4.04 this gave the terrible message:
17
18     None of the type variable(s) in the constraint `Eq a'
19         appears in the type `Set a -> Set a -> Set a'
20     In the type signature for `unionSets'
21 -}