Commit 1d193b11 authored by simonmar's avatar simonmar
Browse files

[project @ 2002-02-13 15:07:17 by simonmar]

Check a difficult operator precedence case: (-3 **) where (**) is
infixl 7 should be disallowed.
parent 02570cc8
......@@ -27,3 +27,4 @@ test "read020" { vtcf("") }
-- on this example.
test "read021" { vtcf("") }
test "read022" { vtcf("") }
test "read023" { vtcf("") }
module ShouldFail where
-- !!! Section precedences
-- check that we're not translating out negative literals too early:
-- the following should be an illegal section because prefix '-' has
-- precedence 6:
k = (-3 **)
where
(**) = const
infixl 7 **
read023.hs:9:
The operator `**' [infixl 7] of a section
must have lower precedence than the operand prefix `-' [infixl 6]
in the section: `((- 3) **)'
Markdown is supported
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