Opened 2 years ago

Closed 2 years ago

#6055 closed bug (fixed)

panic: ctFlavId: derived constraint cannot have id

Reported by: Lemming Owned by:
Priority: normal Milestone:
Component: Compiler (Type checker) Version: 7.5
Keywords: Cc: mikhail.vorozhtsov@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time crash Difficulty: Unknown
Test Case: typecheck/should_compile/T6055 Blocked By:
Blocking: Related Tickets:

Description

When trying to check, whether GHC-7.5 still suffers from #5970 I found another bug: When I compile the attached module I get the type error:

ghc: panic! (the 'impossible' happened)
  (GHC version 7.5.20120426 for i386-unknown-linux):
        ctFlavId: derived constraint cannot have id
    pty   = llvm-extra-0.4:LLVM.Extra.Extension.X86.Add'{tc rj}
              llvm-extra-0.4:LLVM.Extra.Extension.X86.D1{tc ri}
              llvm-extra-0.4:LLVM.Extra.Extension.X86.D1{tc ri}
              llvm-extra-0.4:LLVM.Extra.Extension.X86.D2{tc rh}

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

I tried hard to simplify the example and to remove all dependencies (llvm, type-level), but the test case is still rather involved.

Unfortunately it is again a problem with functional dependencies and I want to get rid of them anyway, but instead switching to type families and then to type level natural numbers I prefer to switch to type level numbers immediately.

Attachments (1)

X86.hs (783 bytes) - added by Lemming 2 years ago.
compiling this module let ghc-7.5.20120426 crash in type checking phase

Download all attachments as: .zip

Change History (5)

Changed 2 years ago by Lemming

compiling this module let ghc-7.5.20120426 crash in type checking phase

comment:1 Changed 2 years ago by dimitris

My bad, I know what is going on. It's a silly mistake (but I am amazed our testsuite did not show this yet!). I will push the fix and add the testsuite in a couple of hours. Many thanks for this testcase!

comment:2 Changed 2 years ago by mikhail.vorozhtsov

  • Cc mikhail.vorozhtsov@… added

comment:3 Changed 2 years ago by simonpj@…

commit 081ee177f3727a4c1bfad5897cab51e30c209521

Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Mon Apr 30 16:20:01 2012 +0100

    Egregious typo (fixes Trac #6055)

 compiler/typecheck/TcInteract.lhs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

comment:4 Changed 2 years ago by simonpj

  • Difficulty set to Unknown
  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to typecheck/should_compile/T6055
Note: See TracTickets for help on using tickets.