Arrow command combinators: addTickHsExpr explodes in GHCi
This code:
{-# LANGUAGE Arrows #-}
module T where
import Prelude
import Control.Arrow
mapAC :: Arrow arr => Integer -> arr (env, b) c -> arr (env, [b]) [c]
mapAC n farr = go 1
where
go i | i == succ n = arr (\(_env, []) -> [])
| otherwise = proc ~(env, b : bs) ->
do c <- farr -< (env, b)
cs <- go (succ i) -< (env, bs)
returnA -< c : cs
t :: Arrow arr => arr [a] [a]
t = proc ys ->
(| (mapAC 3) (\y -> returnA -< y) |) ys
compiles fine using GHC. In GHCi I get:
ghc: panic! (the 'impossible' happened)
(GHC version 7.0.3 for i386-apple-darwin):
addTickHsExpr
(|/\(@ a{tv ar3} [sk]).
((main:T.mapAC{v rdR} [lid]) @ arr{tv aqZ} [sk] @ a{tv ar3} [sk]
@ a{tv ar0} [sk]
@ a{tv ar0} [sk]
$dArrow{v ar4} [lid]
3 (3))
((\ ((y{v ajL} [lid] :: a{tv ar0} [sk]))
-> {18:26-37}
(base:Control.Arrow.returnA{v rdx} [gid]) @ arr{tv aqZ} [sk]
@ a{tv ar0} [sk]
$dArrow{v ar5} [lid] -< y{v ajL} [lid]))|)
Trac metadata
Trac field | Value |
---|---|
Version | 7.0.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | peteg42@gmail.com |
Operating system | |
Architecture |