[project @ 1999-12-15 10:01:42 by simonmar]
authorsimonmar <unknown>
Wed, 15 Dec 1999 10:01:42 +0000 (10:01 +0000)
committersimonmar <unknown>
Wed, 15 Dec 1999 10:01:42 +0000 (10:01 +0000)
Add test displaying bug in fixity resolution on lhs of a function
binding.  We currently fail on this example, but at least putting it
in the test suite will make sure we don't forget about it :)

ghc/tests/reader/should_compile/read027.hs [new file with mode: 0644]

diff --git a/ghc/tests/reader/should_compile/read027.hs b/ghc/tests/reader/should_compile/read027.hs
new file mode 100644 (file)
index 0000000..c793ca7
--- /dev/null
@@ -0,0 +1,14 @@
+module ShouldCompile where
+
+infix 5 |- 
+infix 9 :=
+
+data Equal = Char := Int
+
+-- fails in GHC 4.04, due to not doing fixity resolution on the lhs
+-- before deciding which is the function symbol.
+
+(|-) :: Int -> Equal -> Bool
+0 |- x:=y = 1 |- x:=y      -- XXX fails here
+2 |- (x:=y) = 0 |- x:=y
+_ |-  _     = False