[GHC] #9084: Template Haskell should warn when it encounters an unencodable pragma

GHC ghc-devs at haskell.org
Wed May 7 15:40:31 UTC 2014


#9084: Template Haskell should warn when it encounters an unencodable pragma
------------------------------------+-------------------------------------
       Reporter:  goldfire          |             Owner:  goldfire
           Type:  bug               |            Status:  new
       Priority:  normal            |         Milestone:
      Component:  Template Haskell  |           Version:  7.8.2
       Keywords:                    |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+-------------------------------------
 When I say this

 {{{
 {-# LANGUAGE TemplateHaskell #-}
 {-# OPTIONS_GHC -Wall #-}

 module Bug where

 $([d|
    class C a where
      meth :: a -> a
      meth = undefined -- give a (silly) default
      {-# MINIMAL meth #-}
    |])

 instance C Int
 }}}

 I get no warnings. I'm not surprised that TH doesn't handle every pragma
 that GHC knows about, but it should issue a (suppressable) warning when it
 discards one.

 I can fix this one.

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


More information about the ghc-tickets mailing list