[project @ 1996-07-26 20:58:52 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 module ShouldSucceed where
14
15
16 test::(Num a, Eq a) => a -> Bool
17 test x = (x `mod` 3) == 0
18
19 {-
20 granite> ndph bug002.ldh
21 Data Parallel Haskell Compiler, version 0.01 (Glasgow 0.07)
22
23  
24 "<unknown>", line <unknown>: Cannot express dicts in terms of dictionaries available:
25 dicts_encl:
26    "<built-in>", line : dict.87 :: <Num a>
27    "<built-in>", line : dict.88 :: <Eq a>
28 dicts_encl':
29    "<built-in>", line : dict.87 :: <Num a>
30    "<built-in>", line : dict.88 :: <Eq a>
31 dicts:
32    "<built-in>", line : dict.87 :: <Num a>
33    "<built-in>", line : dict.88 :: <Eq a>
34 super_class_dict: "<built-in>", line : dict.80 :: <Integral a>
35 Fail: Compilation errors found
36
37 dph: execution of the Haskell compiler had trouble
38
39 -}