[GHC] #15270: TH doesn't verify name types during conversion

GHC ghc-devs at haskell.org
Sat Jun 16 19:00:14 UTC 2018


#15270: TH doesn't verify name types during conversion
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Template Haskell  |              Version:  8.4.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):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 Interesting, I excluded my hypothesis after noticing that the following
 testcase indeed fails with a proper error:
 {{{#!hs
 {-# LANGUAGE TemplateHaskell #-}

 module T10047A where

 import Language.Haskell.TH

 -- Passing var name to conE should fail.
 x = $(conE 'id)
 }}}
 I didn't look much farther after this.

 Quite interesting that `mkNameG_v` gets around the error. Are you going to
 continue looking into this or should I add it to my queue?

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


More information about the ghc-tickets mailing list