#7703 closed bug (fixed)

GHCI crashes when loading a file, Windows 7 64 bit

Reported by: crntaylor Owned by:
Priority: normal Milestone:
Component: GHCi Version: 7.6.2
Keywords: Cc:
Operating System: Windows Architecture: x86_64 (amd64)
Type of failure: GHCi crash Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

The file I'm loading in is reproduced here. I suspect the error is related to line 131, as it disappears when I comnment that line out.

https://gist.github.com/chris-taylor/4977772

This is the output when using ghci -v:

C:\Users\ctaylor\Dropbox\Projects\Adjunction>ghci -v category.hs
GHCi, version 7.4.2: http://www.haskell.org/ghc/ :? for help
Glasgow Haskell Compiler, Version 7.4.2, stage 2 booted by GHC version 7.0.4
Using binary package database: C:\Program Files (x86)\Haskell Platform\2012.4.0.0\lib\package.conf.d\package.cache
Using binary package database: C:\Users\ctaylor\AppData?\Roaming\ghc\i386-mingw32-7.4.2\package.conf.d\package.cache
wired-in package ghc-prim mapped to ghc-prim-0.2.0.0-17c9bd07295565b6290606174529c842
wired-in package integer-gmp mapped to integer-gmp-0.4.0.0-c15e185526893c3119f809251aac8c5b
wired-in package base mapped to base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-2.7.0.0-f72884c301136c17f8a7dfc49c2775c9
wired-in package dph-seq not found.
wired-in package dph-par not found.
Hsc static flags: -static
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
* gcc:
"C:\Program Files (x86)\Haskell Platform\2012.4.0.0\lib/../mingw/bin/gcc.exe" "-fno-stack-protector" "-Wl,--hash-size=31" "-Wl,--reduce-memory-overheads" "-LC:\
Program Files (x86)\Haskell Platform\2012.4.0.0\lib\base-4.5.1.0" "--print-file-name" "wsock32.dll"
* gcc:
"C:\Program Files (x86)\Haskell Platform\2012.4.0.0\lib/../mingw/bin/gcc.exe" "-fno-stack-protector" "-Wl,--hash-size=31" "-Wl,--reduce-memory-overheads" "-LC:\
Program Files (x86)\Haskell Platform\2012.4.0.0\lib\base-4.5.1.0" "--print-file-name" "user32.dll"
* gcc:
"C:\Program Files (x86)\Haskell Platform\2012.4.0.0\lib/../mingw/bin/gcc.exe" "-fno-stack-protector" "-Wl,--hash-size=31" "-Wl,--reduce-memory-overheads" "-LC:\
Program Files (x86)\Haskell Platform\2012.4.0.0\lib\base-4.5.1.0" "--print-file-name" "shell32.dll"
Loading package base ... linking ... done.
* Chasing dependencies:
Chasing modules from:
Stable obj: []
Stable BCO: []
unload: retaining objs []
unload: retaining bcos []
Ready for upsweep []
Upsweep completely successful.
* Deleting temp files:
Deleting:
* Chasing dependencies:
Chasing modules from: *category.hs
Stable obj: []
Stable BCO: []
unload: retaining objs []
unload: retaining bcos []
Ready for upsweep

[NONREC

ModSummary? {

ms_hs_date = Mon Feb 18 14:16:17 GMT Standard Time 2013
ms_mod = main:Main,
ms_textual_imps = [import qualified Prelude,

import Prelude hiding ( id, (.) )]

ms_srcimps = []

}]

* Deleting temp files:
Deleting:
compile: input file category.hs
Created temporary directory: C:\Users\ctaylor\AppData?\Local\Temp\ghc2988_0
* Checking old interface for main:Main:
[1 of 1] Compiling Main ( category.hs, interpreted )
* Parser:
* Renamer/typechecker:
ghc.exe: panic! (the 'impossible' happened)

(GHC version 7.4.2 for i386-unknown-mingw32):

kindFunResult ghc-prim:GHC.Prim.*{(w) tc 34d}

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

Attachments (1)

category.hs (4.0 KB) - added by crntaylor 14 months ago.

Download all attachments as: .zip

Change History (3)

Changed 14 months ago by crntaylor

comment:1 Changed 14 months ago by crntaylor

  • Architecture changed from Unknown/Multiple to x86_64 (amd64)
  • Component changed from Compiler to GHCi
  • Operating System changed from Unknown/Multiple to Windows
  • Type of failure changed from None/Unknown to GHCi crash

comment:2 Changed 14 months ago by monoidal

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

Here's a small version:

newtype O f g a = Compose { getCompose :: f (g a) }

mapC :: cat a b -> cat (O g f a) (O g f b)
mapC (Compose f) = mapC (mapC f)

GHC 7.4 and 7.6 panic, but HEAD correctly reports:

cat.hs:11:7:
    Couldn't match kind `* -> *' with `*'
    When matching types
      t0 :: * -> *
      a :: *
    Expected type: cat a b
      Actual type: O (cat a0) t0 b
    In the pattern: Compose f
    In an equation for `mapC': mapC (Compose f) = mapC (mapC f)

(it also reports unrelated ambiguity in your code related to fundeps)

I think the underlying cause is the same as #7368.

Note: See TracTickets for help on using tickets.