[GHC] #9813: Error when reifying type constructor

GHC ghc-devs at haskell.org
Fri Feb 12 18:05:26 UTC 2016


#9813: Error when reifying type constructor
-------------------------------------+-------------------------------------
        Reporter:  owst              |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  7.8.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D1899
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 Replying to [comment:16 owst]:
 > * In step 2. I think it would be necessary that a splice within a
 declaration cannot refer to the declaration itself (though I'm not
 ''sure'' this is a problem?)

 Right. We at least can't allow an expression splice to refer to the type
 of the containing declaration:
 {{{
 x = $(if the type of x is Char then [| False |] else [| 'a' |])
 }}}
 So the topological sorting in goldfire's steps 2-3 is a bit overkill, and
 what is really going on is:

     2-3. Within each region, process all the declarations that do not
 contain splices first. Then process all the declarations that do contain
 splices, making the declarations in the former group available for
 reification and calling.

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


More information about the ghc-tickets mailing list