Skip to content

Fix TypeData issues (fixes #22315 and #22332)

Ross Paterson requested to merge RossPaterson/ghc:wip/type-data into master

There were two bugs here:

  1. Treating type-level constructors as PromotedDataCon doesn't always work, in particular because constructors promoted via DataKinds are called both T and 'T. (Tests T22332a, T22332b, T22315) Fix: guard these cases with isDataKindsPromotedDataCon.

  2. Type-level constructors were sent to the code generator, producing things like constructor wrappers. (Tests T22332a, T22332b) Fix: test for them in isDataTyCon.

Also added a test TDGADT for a type-level GADT.

Edited by Ross Paterson

Merge request reports