Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#2238 closed merge (fixed)

panic nameModule tpl_B1{v}

Reported by: claus Owned by: igloo
Priority: normal Milestone: 6.10 branch
Component: Compiler Version: 6.9
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: T2238 Blocked By:
Blocking: Related Tickets:

Description

using the attached code, we get

*Main> cfd True
"cfd"
*Main> ctf True

<interactive>:1:0:
    No instance for (CTF Bool how)
      arising from a use of `ctf' at <interactive>:1:0-7
    Possible fix: add an instance declaration for (CTF Bool how)
    In the expression: ctf True
    In the definition of `it': it = ctf True

but if we uncomment the CTF instance, we get panic, even for cfd..

*Main> cfd True
: panic! (the 'impossible' happened)
  (GHC version 6.9.20080217 for i386-unknown-mingw32):
        nameModule tpl_B1{v}

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

*Main> ctf True
: panic! (the 'impossible' happened)
  (GHC version 6.9.20080217 for i386-unknown-mingw32):
        nameModule tpl_B1{v}

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

Attachments (1)

FDvsTF.hs (646 bytes) - added by claus 6 years ago.

Download all attachments as: .zip

Change History (8)

Changed 6 years ago by claus

comment:1 Changed 6 years ago by claus

btw, before the panic, this was meant to pin down an issue with TFs (vs FDs), where TFs don't improve types sufficiently for instance selection. compare:

*Main> :t undefined :: CTF Bool how => how
undefined :: CTF Bool how => how :: HowTF Bool
*Main> :t undefined :: CFD Bool how => how
undefined :: CFD Bool how => how :: A

comment:2 Changed 6 years ago by igloo

  • Difficulty set to Unknown
  • Milestone set to 6.10 branch

Thanks for the report.

comment:3 Changed 6 years ago by simonpj

  • Owner set to simonpj

I'm fixing this

Simon

comment:4 Changed 6 years ago by simonpj

  • Owner changed from simonpj to igloo
  • Test Case set to T2238
  • Type changed from bug to merge

Fixed by

Mon Apr 28 14:47:30 BST 2008  simonpj@microsoft.com
  * Fix Trac #2238: do not use newtype for a class with equality predicates

Only really necessary for the HEAD, but probably worth a go at merging to the branch, if it goes cleanly.

Simon

comment:5 Changed 6 years ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed

After a manual merge the test still failed, so I've just made the test an expected fail on 6.8 instead.

comment:6 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:7 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.