TermParser.hs indicates a restructuring bind with LHS being a special list form (like [a] ++ [b]) being valid, but docs disagree.
Also contains an example where LHS doesn't have surrounding parens.
-- example:
-- (x, y) = foo
-- hd +: tl | hd < 10 = [1,2,3]
-- stuff
--
-- desugars to:
--
-- match foo with
-- (x,y) -> match [1,2,3] with
-- hd +: tl | hd < 10 -> stuff
and
-- We have to look ahead as far as the `=` to know if this is a bind or
-- just an action, for instance:
-- Some 42
-- vs
-- Some 42 = List.head elems
TermParser.hs indicates a restructuring bind with LHS being a special list form (like
[a] ++ [b]
) being valid, but docs disagree.Also contains an example where LHS doesn't have surrounding parens.
and
Fix would be remove or correct these examples.