[GHC] #11098: TH mishandles type variables that begin with an underscore

GHC ghc-devs at haskell.org
Mon Nov 16 19:23:59 UTC 2015


#11098: TH mishandles type variables that begin with an underscore
-------------------------------------+-------------------------------------
           Reporter:  goldfire       |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.0.1
          Component:  Template       |           Version:  7.10.2
  Haskell                            |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 The following GHCi exchange was reported [https://github.com/goldfirere
 /th-desugar/pull/36 here] (you need not follow the link to understand this
 ticket, though).

 {{{
 Prelude Language.Haskell.TH> runQ [d|foo :: forall _a . _a -> _a;foo x =
 x|]
 [SigD foo_6 (ForallT [PlainTV _a_5] [] (AppT (AppT ArrowT (WildCardT (Just
 _a_5))) (WildCardT (Just _a_5)))),FunD foo_6 [Clause [VarP x_7] (NormalB
 (VarE x_7)) []]]
 }}}

 The problem is that the quoted expression uses no wildcards, yet the TH
 output does. That quoted expression just uses a type variable that begins
 with an underscore. Such an expression was allowed in Haskell long before
 wildcards.

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


More information about the ghc-tickets mailing list