Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#5283 closed bug (duplicate)

Arrow command combinators: addTickHsExpr explodes in GHCi

Reported by: peteg Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.0.3
Keywords: Cc: peteg42@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time crash Difficulty:
Test Case: arrows/should_compile/T5283 Blocked By:
Blocking: Related Tickets:

Description

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]))|)

Change History (2)

comment:1 Changed 3 years ago by ross

  • Resolution set to duplicate
  • Status changed from new to closed

duplicate of #5045

comment:2 Changed 3 years ago by simonpj

  • Test Case set to arrows/should_compile/T5283
Note: See TracTickets for help on using tickets.