#5883: INLINE pragmas in instances declarations in quasiqutation are lost
------------------------------+---------------------------------------------
 Reporter:  Khudyakov         |          Owner:                  
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Component:  Template Haskell
  Version:  7.4.1             |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------
 Lets consider following code:
 {{{
 {-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE TypeFamilies    #-}
 module Derive where
 import Language.Haskell.TH
 import Text.Groom

 noInlines = [d|
   data Unit = Unit
   instance Show Unit where
     show _ = ""
     {-# INLINE show #-}
   |]
 }}}

 There is no INLINE pragma. But it's in place for declarations outside of
 instances
 {{{
 > putStrLn . groom =<< runQ mk
 [DataD [] Unit_4 [] [NormalC Unit_5 []] [],
  InstanceD [] (AppT (ConT GHC.Show.Show) (ConT Unit_4))
    [FunD GHC.Show.show
       [Clause [WildP] (NormalB (LitE (StringL ""))) []]]]
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to