Skip to content

Linear types: don't generalize when typechecking a tuple section

Krzysztof Gogolewski requested to merge tweag/ghc:wip/tuple-typechecking into master

With linear types, a section such as (, True) has type forall {m: Multiplicity}. a # m -> (a, Bool).

Previously, the typechecker created a polymorphic type and the desugarer created a type-level lambda.

Now, we do not generalize and return the a # m -> (a, Bool) type directly. The code is simpler and cleaner.

No tests - this is just internal refactoring.

Merge request reports