[GHC] #11081: Implement Introspective Template Haskell
GHC
ghc-devs at haskell.org
Wed Dec 9 13:40:13 UTC 2015
#11081: Implement Introspective Template Haskell
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: ⊥
Component: Template Haskell | Version: 7.10.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
TemplateHaskell/Introspective |
-------------------------------------+-------------------------------------
Comment (by simonpj):
I'm sceptical about the stuff about Core until I see more details. But
that's for the future.
The fundamental idea here is to replace `Language.Haskell.TH.Syntax`
outright with `HsSyn`. The advantages, of course, are (a) avoiding
duplication, (b) TH stop lagging GHC.
The disadvantage is that `HsSyn` is designed as an internal data type for
a compiler. We feel free to
* decorate it with extra information (mostly types) as it moves down the
pipeline,
* have one constructor before type checking and a different one afterwards
(eg `ConPatIn` and `ConPatOut` in `HsPat`
* add elaboration info for type and dictionary applications and
instantiation.
For TH programs that construct syntax trees directly (ie not using
quotation) or pattern-match over them, all this extra clutter might be
confusing and/or awkward.
I'm very unsure about the back-compat shim, but maybe it's possible. Yay
for pattern synonyms.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11081#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list