
On Tue, May 5, 2015 at 10:50 AM, Edward Z. Yang
Very good exercise! Looking for how an existing API is used (perhaps in a clumsy way, because of the inadequacies of the existing API) is a good guide to improving it.
e.g. If tuple names are an issue, let’s provide a TH API for getting
Excerpts from Simon Peyton Jones's message of 2015-05-05 01:15:50 -0700: their names!!
Hello Simon,
The right and proper way of getting a tuple name (well, constructor really, but that's the only reason people want names) should be:
[| (,) |]
But people sometimes don't want to use quotes, e.g. as in https://github.com/ekmett/lens/issues/496 where they want to work with stage1 GHC.
So in this case, https://ghc.haskell.org/trac/ghc/ticket/10382 (making quotes work with stage1 GHC) will help a lot.
Language.Haskell.TH already exports tupleTypeName tupleDataName