odd panic with [()] >>> ()
While messing around with arrows in GHCi, I was surprised to see the following (ill-typed) code cause a panic:
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base ... linking ... done.
Prelude> :m Control.Arrow
Prelude Control.Arrow> [1, 2] >>> pure (+1)
ghc-6.6: panic! (the 'impossible' happened)
(GHC version 6.6 for i386-unknown-linux):
nameModule it{v aIS}
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Further experimentation revealed that
[] >>> ()
is a type-error as expected, whereas
[()] >>> ()
causes a panic.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.6 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |