#2291: Panic mixing RULES and Type Families
------------------------------------------+---------------------------------
 Reporter:  guest                         |          Owner:          
     Type:  bug                           |         Status:  new     
 Priority:  normal                        |      Milestone:          
Component:  Compiler                      |        Version:  6.9     
 Severity:  normal                        |     Resolution:          
 Keywords:  type families, rewrite rules  |     Difficulty:  Unknown 
 Testcase:  attached                      |   Architecture:  Multiple
       Os:  Linux                         |  
------------------------------------------+---------------------------------
Changes (by igloo):

  * difficulty:  => Unknown

Old description:

> It appears that RULES pragmas and type families don't always play nice.
>
> When either of the last two RULES is present, you get an error analogous
> to the following. Attempting to supply a manual type annotation did not
> help.
>
> Attached is a simplified test case.
>
> [1 of 1] Compiling Small            ( Small.hs, interpreted )
> ghc-6.9.20080401: panic! (the 'impossible' happened)
>   (GHC version 6.9.20080401 for i386-unknown-linux):
>         tcSimplifyRuleLhs
>     Wanted t_apn{tv} [tau] :: main:Small.Coexp{tc roa}
>                                 k{tv apj} [tau] b{tv apm} [tau] c{tv apk}
> [tau]
>                                 ~
>                               main:Small.Coexp{tc roa}
>                                 k{tv apj} [tau] b{tv apb} [tau] c{tv apc}
> [tau]
>
> Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

New description:

 It appears that RULES pragmas and type families don't always play nice.

 When either of the last two RULES is present, you get an error analogous
 to the following. Attempting to supply a manual type annotation did not
 help.

 Attached is a simplified test case.
 {{{
 [1 of 1] Compiling Small            ( Small.hs, interpreted )
 ghc-6.9.20080401: panic! (the 'impossible' happened)
   (GHC version 6.9.20080401 for i386-unknown-linux):
         tcSimplifyRuleLhs
     Wanted t_apn{tv} [tau] :: main:Small.Coexp{tc roa}
                                 k{tv apj} [tau] b{tv apm} [tau] c{tv apk}
 [tau]
                                 ~
                               main:Small.Coexp{tc roa}
                                 k{tv apj} [tau] b{tv apb} [tau] c{tv apc}
 [tau]

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

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