[GHC] #1223: ghc-6.6: panic! (the 'impossible' happened)
GHC
trac at galois.com
Wed Mar 14 07:40:50 EDT 2007
#1223: ghc-6.6: panic! (the 'impossible' happened)
-------------------------------+--------------------------------------------
Reporter: jupdike at gmail.com | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 6.6
Severity: normal | Resolution: fixed
Keywords: | Difficulty: Unknown
Testcase: | Architecture: x86
Os: MacOS X |
-------------------------------+--------------------------------------------
Changes (by simonpj):
* resolution: => fixed
* status: new => closed
Comment:
OK I've looked into this. I boiled it down a bit to a single file (see
new below).
The problem turned out to be something to do with "linear implicit
parameters", which are a heavily deprecated feature of GHC 6.6, and are
removed altogether in the HEAD. In Era.hs we find things like "1%n", and
the "%n" was interpreted as a linear implicit parameter.
Of course this still should not trigger a crash.
The 6.6 release notes advertised the linear implicit parameters might well
vanish from 6.6.1, and this seems a good moment to do so. I'm going to
take them out of the parser only.
I'll patch the branch directly; the HEAD is fine.
Simon
Here's my cut-down code:
{{{
module Era where
import Ratio
import Char
import Numeric (readDec, readSigned)
data CR = CR_ (Int -> Integer)
instance Eq CR where
instance Show CR where
instance Ord CR where
instance Num CR where
instance Fractional CR where
instance Floating CR where
log_drx :: CR -> CR
log_drx = power_series [1%n | n <- [1..]] (+1)
acc_seq :: (Rational -> Integer -> Rational) -> [Rational]
acc_seq f = scanl f (1%1) [1..]
exp_dr :: CR -> CR
exp_dr = power_series (acc_seq (\a n -> a*(1%n))) id
power_series :: [Rational] -> (Int -> Int) -> CR -> CR
power_series = error "urk"
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1223>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list