#6013: the 'impossible' happened
------------------------+---------------------------------------------------
Reporter: tlvb | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler (Type checker)
Version: 7.4.1 | Keywords: panic, impossible, type checker,
renamer
Os: Linux | Architecture: x86_64 (amd64)
Failure: GHCi crash | Testcase:
Blockedby: | Blocking:
Related: |
------------------------+---------------------------------------------------
Please forgive me if this is a duplicate or irrelevant, bug reporting and
Haskell are two things I work with seldom enough that I cannot be
considered good at either, but as what happened should be 'impossible' I
thought I'd at least give you a heads up. I tried looking for similar
bugs, but I do not really know what I would be looking for...
GHCi (newly opened, -v flag):
{{{
[leo@derse brutelift]$ ghci -v
GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help
Glasgow Haskell Compiler, Version 7.4.1, stage 2 booted by GHC version
7.4.1
Using binary package database:
/usr/lib/ghc-7.4.1/package.conf.d/package.cache
wired-in package ghc-prim mapped to ghc-
prim-0.2.0.0-c2ff696e5b8ec4d4b2bc2e42085fe471
wired-in package integer-gmp mapped to integer-
gmp-0.4.0.0-3cccac07aef8e27023f605c1f45bdf74
wired-in package base mapped to
base-4.5.0.0-40b99d05fae6a4eea95ea69e6e0c9702
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-
haskell-2.7.0.0-8c8cd20e21666657195efabced685fe1
wired-in package dph-seq not found.
wired-in package dph-par not found.
Hsc static flags: -static
Loading package ghc-prim ... linking ... done.
*** gcc:
'/usr/bin/gcc' '-fno-stack-protector' '-Wl,--hash-size=31' '-Wl,--reduce-
memory-overheads' '-L/usr/lib/ghc-7.4.1/integer-gmp-0.4.0.0' '--print-
file-name' 'libgmp.so'
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :load brutelift
*** 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: *brutelift.hs
Stable obj: []
Stable BCO: []
unload: retaining objs []
unload: retaining bcos []
Ready for upsweep
[NONREC
ModSummary {
ms_hs_date = Tue Apr 17 18:10:32 CEST 2012
ms_mod = main:Main,
ms_textual_imps = [import (implicit) Prelude, import Data.List]
ms_srcimps = []
}]
*** Deleting temp files:
Deleting:
compile: input file brutelift.hs
Created temporary directory: /tmp/ghc5399_0
*** Checking old interface for main:Main:
[1 of 1] Compiling Main ( brutelift.hs, interpreted )
*** Parser:
*** Renamer/typechecker:
ghc: panic! (the 'impossible' happened)
(GHC version 7.4.1 for x86_64-unknown-linux):
nameModule show{tv abQ}
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
>
}}}
brutelift.hs:
{{{
import Data.List
data Transfer = Load | Unload
data Action = Left Transfer Int | Right Transfer Int
data BlockDispersion = Blocks {top :: [Int]
, bottom :: [Int]
, left :: [Int]
, right :: [Int]}
deriving (Show)
data Machine = MOK BlockDispersion [Action] | MError BlockDispersion
[Action] deriving (show)
rSplitAt i xs = let (a, b) = splitAt i $ reverse xs in
(reverse b, reverse a)
moveR :: Int -> ([a], [a]) -> ([a], [a])
moveR i (a, b) = let (c, d) = rSplitAt i a
in (c, d++b)
moveL :: Int -> ([a], [a]) -> ([a], [a])
moveL i (a, b) = let (c, d) = splitAt i b
in (a++c, d)
}}}
I am not sure what additional info to provide...
Running an Arch linux system, 8GB ram, installed ghc packgage should be as
vanilla as can be...
{{{
[leo@derse brutelift]$ uname -a
Linux derse 3.3.1-1-ARCH #1 SMP PREEMPT Tue Apr 3 06:46:17 UTC 2012 x86_64
Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz GenuineIntel GNU/Linux
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6013>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs