Ticket #1673 (closed feature request: fixed)

Opened 6 years ago

Last modified 3 years ago

Template Haskell support for type families

Reported by: g9ks157k@… Owned by:
Priority: high Milestone: 6.12 branch
Component: Template Haskell Version: 6.7
Keywords: Cc: hpacheco@…, ganesh@…, mjm2002@…, alexander.dunlap@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Would it be possible to add support for analyzing and generating type family stuff to Template Haskell?

Change History

Changed 6 years ago by simonpj

  • priority changed from normal to low

I don't think this is likely to happen any time soon.

TH has a data type for Haskell programs, completely separate from GHC's data type. This is a strength because it brings stablity, but a weakness because it means it always lags a long way behind.

In the case of type families, we barely have them working in GHC, so it'd might be a bit soon to dump them into TH. And even when they are stable there's the question of who will do the design and implementation. Perhaps some TH users can join in!

Meanwhile I'll put this as low priority.

Simon

Changed 6 years ago by igloo

  • milestone set to 6.10 branch

I've put this in the 6.10 milestone for now, but it would probably need someone to jump in and implement it.

Changed 5 years ago by ganesh

  • cc ganesh@… added

Changed 5 years ago by hpacheco

  • cc hpacheco@… added; ganesh@… removed

Changed 5 years ago by hpacheco

  • cc ganesh@… added

Changed 5 years ago by hpacheco

Myself, I would simply like to be able to write TH code to automatically generate type family instances. However, I understand it is not a very important feature.

Changed 5 years ago by morrow

  • cc mjm2002@… added

Changed 5 years ago by ajd

  • cc alexander.dunlap@… added

Changed 4 years ago by AndyGill

Having this is important to the kure-your-boilerplate work. It would save quite a bit of typing for KURE users. Any chance for 6.12?

AndyG

Changed 4 years ago by igloo

  • priority changed from low to high
  • os changed from Linux to Unknown/Multiple
  • architecture changed from x86 to Unknown/Multiple
  • milestone changed from 6.10 branch to 6.12 branch

Lots of interest, so I've raised the priority.

Changed 4 years ago by chak

  • status changed from new to closed
  • resolution set to fixed

I just pushed patches adding support for type family declarations (toplevel and associated) and equality constraints to TH.

The downside is that it changes the API of Language.Haskell.TH in an incompatible way (to distinguish between class constraints and equality constraints). Given that I had to change the API anyways, we agreed to add kinds, too. I'll do that in the next few days, but it'll change the API even a bit more.

Note: See TracTickets for help on using tickets.