[GHC] #11832: Allow reify to yield types in the current declaration group

GHC ghc-devs at haskell.org
Thu Jun 2 14:28:22 UTC 2016


#11832: Allow reify to yield types in the current declaration group
-------------------------------------+-------------------------------------
        Reporter:                    |                Owner:
  facundo.dominguez                  |  facundo.dominguez
            Type:  feature request   |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  7.10.3
      Resolution:                    |             Keywords:  reify
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2286
       Wiki Page:                    |
  TemplateHaskell/Reify              |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 > That looks better if you can somehow implement the {{{Data (Q ())}}}
 instance that the compiler will request for adding such field in the AST.

 Well you can wrap it in a newtype and make a hand Data instance that will
 skip the field.  The tail should not wag the dog.

 > We could still use a Map to store the finalizers, instead of storing
 local type environments as we are doing now.

 I don't understand. Why would you need a Map. I gave a full implementation
 above.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11832#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list