Skip to content
Snippets Groups Projects
Commit 2c0f8ddb authored by Andrei Borzenkov's avatar Andrei Borzenkov Committed by Marge Bot
Browse files

Improve pattern to type pattern transformation (23739)

`pat_to_type_pat` function now can handle more patterns:
  - TuplePat
  - ListPat
  - LitPat
  - NPat
  - ConPat

Allowing these new constructors in type patterns significantly
increases possible shapes of type patterns without `type` keyword.

This patch also changes how lookups in `lookupOccRnConstr` are
performed, because we need to fall back into
types when we didn't find a constructor on data level to perform
`ConPat` to type transformation properly.
parent d65bf4a2
No related branches found
No related tags found
No related merge requests found
Showing
with 356 additions and 142 deletions
Loading
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