[GHC] #14474: reify RHS of "value" variable
GHC
ghc-devs at haskell.org
Thu Nov 16 16:44:46 UTC 2017
#14474: reify RHS of "value" variable
-------------------------------------+-------------------------------------
Reporter: dailectic | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Template Haskell | Version: 8.2.1
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: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
I don't think this will be so easy.
GHC doesn't store the RHS of definitions in a convenient form to be
reified into TH. Specifically, when GHC does store the RHS (only for
inlinable definitions), it stores it in Core, not Haskell. So part of this
work would be translating Core back to Haskell (not impossible).
It actually might make a nice project... but the TH AST you get out at the
end might not look much like what the user typed in originally.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14474#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list