Skip to content

Separating patterns and other expressions #95

@danilopedraza

Description

@danilopedraza

I need to check that patterns are only written where they are allowed. These are the allowed places:

  • As function parameters (named and anonymous)
    • Named
    • Anonymous
  • In the left hand side of case expression rules
  • In the left hand side of declarations
  • In the left hand side of assignments
  • As for loop variables
  • In list comprehensions
  • In set comprehensions

They are forbidden everywhere else. Currently, when a pattern is written somewhere else, the evaluator panics. I don't like that. Specific enough error messages should be shown instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions