Skip to content
Snippets Groups Projects
Commit eff637eb authored by sof's avatar sof
Browse files

[project @ 1998-06-11 10:32:06 by sof]

Testing the illegal use of pattern syntax in expressions (and vice versa)
parent b210c653
No related merge requests found
......@@ -14,9 +14,9 @@ module Read003 where
read003.hs:8:
Occurs check: cannot construct the infinite type:
aMm = (aMm, aMp, aMs)
Expected: (aMm, [aMA], aMs)
Inferred: aMm
aKy = (aKy, aKB, aKE)
Expected: (aKy, [aKM], aKE)
Inferred: aKy
In a pattern binding:
~(a, b, c)
| nullity b = a
......
--!!! Using pattern syntax on RHS
module ShouldFail where
f :: Int -> Int
f x = _
g :: Int -> Int
g x = 2 + 2@_
read006.hs:5:7: pattern syntax used in expression on input: "_"
--!!! Expressions as patterns inside do stmt blocks
module ShouldFail where
f :: Int -> IO Int
f x = do
(2+2) <- 2
return x
read007.hs:7:3: variable application in pattern on input: "return"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment