Commit 648d1b91 authored by simonpj's avatar simonpj
Browse files

[project @ 2001-06-28 16:25:46 by simonpj]

Update tests
parent 190697f3
Duplicate or overlapping instance declarations:
tcfail023.hs:10: {A B}
tcfail023.hs:13: {A B}
tcfail023.hs:11:
Couldn't match `B' against `Bool'
Expected type: B
Inferred type: Bool
In the right-hand side of an equation for `op': True
tcfail023.hs:14:
Couldn't match `B' against `Bool'
Expected type: B
Inferred type: Bool
In the right-hand side of an equation for `op': True
Duplicate instance declarations:
tcfail023.hs:10: A B
tcfail023.hs:13: A B
tcfail062.hs:37:
Illegal polymorphic type as argument: BehaviouralRelation
In the type synonym declaration for `BehaviouralRelationList'
tcfail062.hs:33:
Type variable not in scope: `behaviouralExpression'
tcfail062.hs:33:
Type variable not in scope: `behaviouralExpression'
Duplicate or overlapping instance declarations:
tcfail073.hs:7: {Eq (a, b)}
/home/simonmar/builds/i386-unknown-linux/ghc/compiler/../lib/std/PrelTup.hi:66: {Eq (a,
b)}
tcfail073.hs:8:
Could not deduce `Eq a' from the context (Eq (a, b))
Probable fix:
Add `Eq a' to the instance declaration context
arising from use of `==' at tcfail073.hs:8
In the right-hand side of an equation for `==': m == o
Duplicate instance declarations:
tcfail073.hs:7: Eq (a, b)
/home/simonpj/builds/HEAD/ghc/driver/../lib/std/PrelTup.hi:87: Eq (a,
b)
......@@ -6,8 +6,6 @@ module ShouldFail where
import PrelGHC
x = 1#
y :: Int#
y = x +# 1#
......@@ -16,3 +14,4 @@ main = let
in
if z ># 3# then putStrLn "Yes"
else putStrLn "No"
[-# -fglasgow-exts #-}
-- !!! Multi-param type classes test: ambiguity bug
module ShouldFail where
class Collection c a where
......
......@@ -2,8 +2,4 @@
tcfail088.hs:9:
Illegal polymorphic type as argument: forall s. T s a
When checking kinds in `Ord (forall s. T s a)'
tcfail088.hs:14:
Illegal polymorphic type as argument: forall b. b
When checking kinds in `T s (forall b. b)'
In a type signature for `g'
In the instance declaration for `Ord (forall s. T s a)'
tcfail094.hs:7:
Couldn't match `*' against `* -> k'
Expected kind: *
Inferred kind: * -> k
When checking kinds in `Int 1'
In the type synonym declaration for `A'
{-# OPTIONS -fglasgow-exts #-}
-- !!! Test top-level unboxed types
module ShouldFail where
import PrelGHC
x = 1#
tcfail095.hs:9:
Top-level bindings for unlifted types aren't allowed: x = 1#
When generalising the type(s) for x
......@@ -15,11 +15,11 @@ instance Foo (Maybe a) [a] where
foo Nothing = []
foo (Just x) = [x]
test3:: [a] -> [b]
test3:: [a] -> [a]
test3 = foo . foo
-- First foo must use the first instance,
-- second must use the second. So we should
-- get in effect: test3 (x:xs) = [x]
main:: IO ()
main = print (test3 "foo" :: [Int])
main = print (test3 "foo")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment