:print in ghci: impossible happened
GHCi, version 6.8.1: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
Prelude> let fac n = foldl (*) 1 [1..n]
Prelude> :print fac
fac = <function>
ghc-6.8.1: panic! (the 'impossible' happened)
(GHC version 6.8.1 for i386-unknown-linux):
ghci/Debugger.hs:84:11-72: Irrefutable pattern failed for pattern Data.Maybe.Just subst
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
This also happens with:
Prelude> let sum' a b = a+b
Prelude> let product' a b = a*b
Prelude> let sum' a b = (+) a b
but not with:
Prelude> let sum a b = a
Prelude> :print sum
sum = <function>
Prelude> let summ a b = id b
Prelude> :print summ
summ = <function>
Prelude> let id' x = x
Prelude> :print id'
id' = <function>
Prelude> let product' = (*)
Prelude> :print product'
product' = <function>
Prelude> let sum' = (+)
Prelude> :print sum'
sum' = <function>
All these functions do work properly when used in expressions
Trac metadata
Trac field | Value |
---|---|
Version | 6.8.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Unknown |
Architecture | Unknown |