Opened 3 years ago

Closed 3 years ago

#5533 closed bug (fixed)

panic! (the 'impossible' happened) ... splitFunTy ...

Reported by: guest Owned by: simonpj
Priority: normal Milestone:
Component: Compiler Version: 7.0.3
Keywords: splitFunTy Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: rename/should_fail/T5533 Blocked By:
Blocking: Related Tickets:


"MyModule?.hs" containing these four lines:

module MyModule where
data T a = CT {f1 :: Int -> a, f2 :: Double}
f2 :: Int -> Double
g x = CT {f1 = \t -> f2 t + x, f2 = x}


C:\Tasks\Task_IsolateGhcBug>ghc --make MyModule.hs -v
Glasgow Haskell Compiler, Version 7.0.3, for Haskell 98, stage 2 booted by GHC version 6.12.2
Using binary package database: C:\Programme\Haskell Platform\2011.2.0.1\lib\package.conf.d\package.cache
wired-in package ghc-prim mapped to ghc-prim-
wired-in package integer-gmp mapped to integer-gmp-
wired-in package base mapped to base-
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-
wired-in package dph-seq not found.
wired-in package dph-par not found.
Hsc static flags: -static
*** Chasing dependencies:
Chasing modules from: *MyModule.hs
Stable obj: []
Stable BCO: []
Ready for upsweep
      ModSummary {
         ms_hs_date = Thu Oct  6 19:01:55 Westeuropäische Sommerzeit 2011
         ms_mod = main:MyModule,
         ms_imps = [import Prelude]
         ms_srcimps = []
compile: input file MyModule.hs
Created temporary directory: C:\Temp\ghc4956_0
*** Checking old interface for main:MyModule:
[1 of 1] Compiling MyModule         ( MyModule.hs, MyModule.o )
*** Parser:
*** Renamer/typechecker:
*** Desugar:
*** Deleting temp files:
Deleting: C:\Temp\ghc4956_0\ghc4956_0.s
Warning: deleting non-existent C:\Temp\ghc4956_0\ghc4956_0.s
*** Deleting temp dirs:
Deleting: C:\Temp\ghc4956_0
ghc: panic! (the 'impossible' happened)
  (GHC version 7.0.3 for i386-unknown-mingw32):
    forall a{tv aby} [tv].
    main:MyModule.T{tc rbp} a{tv aby} [tv]
    -> ghc-prim:GHC.Types.Double{(w) tc 3u}

Please report this as a GHC bug:

Change History (3)

comment:1 Changed 3 years ago by simonpj

  • Owner set to simonpj

I'm on this

comment:2 Changed 3 years ago by simonpj@…

commit 8f3f41787c2ec4ee5ce4f488580a0480abf2d3c5

Author: Simon Peyton Jones <>
Date:   Fri Oct 21 16:37:43 2011 +0100

    Refactor the way in which type (and other) signatures are renamed
    This was a trickier change than I had anticipated, but I think
    it's considerably tidier now.
    Fixes Trac #5533.

 compiler/hsSyn/HsBinds.lhs     |   19 -------
 compiler/rename/RnBinds.lhs    |   97 +++++++++++++++++++---------------
 compiler/rename/RnEnv.lhs      |  115 ++++++++++++++++++++++++----------------
 compiler/rename/RnSource.lhs   |    5 +-
 compiler/typecheck/TcDeriv.lhs |    5 +-
 5 files changed, 129 insertions(+), 112 deletions(-)

comment:3 Changed 3 years ago by simonpj

  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to rename/should_fail/T5533
Note: See TracTickets for help on using tickets.