Skip to content

Negative numbers in pattern matches are syntax errors #1261

Open
@rtfeldman

Description

@rtfeldman

This is an sscce version of #1259

f x =
  case x of
    1 -> "ok"
    -1 -> "breaks parsing"
    _ -> "ok"

Gives a syntax error.

If you swap the -1 pattern with the previous line, everything compiles, so the problem seems to affect only patterns after the first one.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions