
"ghc-types" sounds like a package for fancy type hackery. I would never think to find language extension flags in such a place. How about "ghc-package-db", or "ghc-language-extensions"?
Regards,
Malcolm
On 10 Sep, 2015,at 03:30 AM, "Edward Z. Yang"
#10820 on Trac [1] and D1200 on Phabricator [2] discuss adding the capababilty to Template Haskell to detect which language extensions enabled. Unfortunately, since template-haskell can't depend on ghc (as ghc depends on template-haskell), it can't simply re-export the ExtensionFlag type from DynFlags to the user.
There is a second data type encoding the list of possible language extensions in the Cabal package, in Language.Haskell.Extension [3]. But template-haskell doesn't already depend on Cabal, and doing so seems like it would cause difficulties, as the two packages can be upgraded separately.
So adding this new feature to Template Haskell requires introducing a *third* data type for language extensions. It also requires enumerating this full list in two more places, to convert back and forth between the TH Extension data type and GHC's internal ExtensionFlag data type.
Is there another way here? Can there be one single shared data type for this somehow?
[1] https://ghc.haskell.org/trac/ghc/ticket/10820 [2] https://phabricator.haskell.org/D1200 [3] https://hackage.haskell.org/package/Cabal-1.22.4.0/docs/Language-Haskell-Ext...
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.orgmailto:ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

On Thu, Sep 10, 2015 at 4:28 AM, malcolm.wallace
"ghc-types" sounds like a package for fancy type hackery. I would never think to find language extension flags in such a place. How about "ghc-package-db", or "ghc-language-extensions"?
ghc-integration ghc-core-data -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

How about ghc-datatypes? ghc-core-data seems like it would have something to do with the Core language and ghc-integration sounds like it is a layer on top of ghc. Using the -types suffix has quite som precedence [1] for packages defining shared datatypes (as does the -core suffix), but given Malcolms comment it is perhaps not a good fit for GHC. [1]: http://hackage.haskell.org/packages/search?terms=types Adam Sandberg Eriksson On Thu, 10 Sep 2015, at 05:50 PM, Brandon Allbery wrote:
On Thu, Sep 10, 2015 at 4:28 AM, malcolm.wallace
wrote: "ghc-types" sounds like a package for fancy type hackery. I would never think to find language extension flags in such a place. How about "ghc-package-db", or "ghc-language-extensions"?
ghc-integration ghc-core-data
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net _________________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
participants (3)
-
Adam Sandberg Eriksson
-
Brandon Allbery
-
malcolm.wallace