Skip to content
Snippets Groups Projects
Commit 0f0c53a5 authored by Vladislav Zavialov's avatar Vladislav Zavialov Committed by Marge Bot
Browse files

T2T in Patterns (#23739)

This patch implements the T2T (term-to-type) transformation in patterns.
Patterns that are checked against a visible forall can now be written
without the `type` keyword:

	  \(type t) (x :: t) -> ...   -- old
	  \t (x :: t) -> ...          -- new

The `t` binder is parsed and renamed as a term pattern (Pat), but
then undergoes a conversion to a type pattern (HsTyPat).
See the new function pat_to_type_pat in compiler/GHC/Tc/Gen/Pat.hs
parent d5610737
No related branches found
No related tags found
Loading
Showing
with 301 additions and 58 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