Ticket #2291 (closed bug: fixed)

Opened 4 years ago

Last modified 3 years ago

Panic mixing RULES and Type Families

Reported by: guest Owned by:
Priority: normal Milestone: 6.10.1
Component: Compiler Version: 6.9
Keywords: type families, rewrite rules Cc: ekmett@…
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: T2291 Blocked By:
Blocking: Related Tickets:

Description (last modified by igloo) (diff)

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

Attachments

Small.hs Download (466 bytes) - added by guest 4 years ago.
A stripped down closed cocartesian category class with "bad" RULES

Change History

Changed 4 years ago by guest

A stripped down closed cocartesian category class with "bad" RULES

Changed 4 years ago by guest

  • cc ekmett@… added

Changed 4 years ago by igloo

  • difficulty set to Unknown
  • description modified (diff)

Changed 4 years ago by igloo

  • milestone set to 6.10.1

Thanks for the report and small testcase!

Changed 3 years ago by simonmar

  • architecture changed from Multiple to Unknown/Multiple

Changed 3 years ago by chak

  • status changed from new to closed
  • testcase changed from attached to T2291
  • resolution set to fixed

Works with the new solver.

Note: See TracTickets for help on using tickets.