[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / compiler / tests / typecheck / should_fail / tcfail034.hs
1 {-
2 From: Jon Hill <hilly@dcs.qmw.ac.uk@jess.gla.ac.uk@pp.dcs.glasgow.ac.uk>
3 To: glasgow-haskell-bugs
4 Subject: Unfriendly error message
5 Date: Thu, 25 Jun 1992 09:22:55 +0100
6
7 Hello again,
8
9 I came across a rather nasty error message when I gave a function an
10 incorrect type signature (the context is wrong). I can remember reading 
11 in the source about this problem - I just thought I'd let you know anyway :-)
12 -}
13
14 test::(Num a, Eq a) => a -> Bool
15 test x = (x `mod` 3) == 0
16
17 {-
18 granite> ndph bug002.ldh
19 Data Parallel Haskell Compiler, version 0.01 (Glasgow 0.07)
20
21  
22 "<unknown>", line <unknown>: Cannot express dicts in terms of dictionaries available:
23 dicts_encl:
24    "<built-in>", line : dict.87 :: <Num a>
25    "<built-in>", line : dict.88 :: <Eq a>
26 dicts_encl':
27    "<built-in>", line : dict.87 :: <Num a>
28    "<built-in>", line : dict.88 :: <Eq a>
29 dicts:
30    "<built-in>", line : dict.87 :: <Num a>
31    "<built-in>", line : dict.88 :: <Eq a>
32 super_class_dict: "<built-in>", line : dict.80 :: <Integral a>
33 Fail: Compilation errors found
34
35 dph: execution of the Haskell compiler had trouble
36
37 -}