#4918: Rule matcher failing to look through an imported inlining
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:              
        Type:  bug               |       Status:  new         
    Priority:  normal            |    Milestone:              
   Component:  Compiler          |      Version:  7.0.1       
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------
 Pedro reported
 {{{
 module M1 where
   class MyEnum a where myEnum :: [a]
   instance MyEnum () where myEnum = [()]

 module M2 where
   import M1

   f1 = map (\() -> 'p') [()]
   f2 = map (\() -> 'q') myEnum
 }}}
 The code for `f1` was optimised (by rewrite rules) to
 {{{
   f1 = ['p']
 }}}
 but the code for `f2` wasn't.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4918>
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