X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftests%2Ftypecheck%2Fshould_fail%2Ftcfail034.hs;fp=ghc%2Fcompiler%2Ftests%2Ftypecheck%2Fshould_fail%2Ftcfail034.hs;h=e0d0ffeacec616aca87a0c5ea532db5f6adfb131;hb=e7d21ee4f8ac907665a7e170c71d59e13a01da09;hp=0000000000000000000000000000000000000000;hpb=e48474bff05e6cfb506660420f025f694c870d38;p=ghc-hetmet.git diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail034.hs b/ghc/compiler/tests/typecheck/should_fail/tcfail034.hs new file mode 100644 index 0000000..e0d0ffe --- /dev/null +++ b/ghc/compiler/tests/typecheck/should_fail/tcfail034.hs @@ -0,0 +1,37 @@ +{- +From: Jon Hill +To: glasgow-haskell-bugs +Subject: Unfriendly error message +Date: Thu, 25 Jun 1992 09:22:55 +0100 + +Hello again, + +I came across a rather nasty error message when I gave a function an +incorrect type signature (the context is wrong). I can remember reading +in the source about this problem - I just thought I'd let you know anyway :-) +-} + +test::(Num a, Eq a) => a -> Bool +test x = (x `mod` 3) == 0 + +{- +granite> ndph bug002.ldh +Data Parallel Haskell Compiler, version 0.01 (Glasgow 0.07) + + +"", line : Cannot express dicts in terms of dictionaries available: +dicts_encl: + "", line : dict.87 :: + "", line : dict.88 :: +dicts_encl': + "", line : dict.87 :: + "", line : dict.88 :: +dicts: + "", line : dict.87 :: + "", line : dict.88 :: +super_class_dict: "", line : dict.80 :: +Fail: Compilation errors found + +dph: execution of the Haskell compiler had trouble + +-}