#1946: Ctr-c doesn't work in ghci-6.8.1, probably related to #1922
-------------------------------+--------------------------------------------
Reporter: daniel.is.fischer | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 6.8.1
Severity: normal | Keywords:
Testcase: | Architecture: x86
Os: Linux |
-------------------------------+--------------------------------------------
In ghci-6.8.1, pressing Ctrl-c once during an evaluation has no influence,
pressing it twice during the same evaluation results in
{{{
Prelude Data.List> foldl' (+) 0 [1 .. 20000000]
<interactive>: exception :: GhcException
}}}
and it only returns to the prompt after a third Ctrl-c
{{{
*** Exception: <<loop>>
Prelude Data.List>
}}}
However, then no more computations are performed,only ghci commands (:?,
:i, :t, :q) are then processed.
A complete sample session, Ctrl-c was pressed once in each of the first
two evaluations, twice in the third, then once more to produce ***
Exception: <<loop>> and return to the prompt. From then onwards, any
expression typed at the prompt results in no activity until a further
Ctrl-c is pressed.
{{{
[EMAIL PROTECTED]:~> ghci
GHCi, version 6.8.1: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
Prelude> :set +s
Prelude> :m +Data.List
Prelude Data.List> foldl' (+) 0 [1 .. 10000000]
50000005000000
(4.47 secs, 1041858060 bytes)
Prelude Data.List> foldl' (+) 0 [1 .. 20000000]
200000010000000
(8.68 secs, 2081067868 bytes)
Prelude Data.List> foldl' (+) 0 [1 .. 20000000]
<interactive>: exception :: GhcException
*** Exception: <<loop>>
Prelude Data.List> foldl' (+) 0 [1 .. 20000000]
*** Exception: <<loop>>
Prelude Data.List> foldl' (+) 0 [1 .. 20]
*** Exception: <<loop>>
Prelude Data.List> :?
Commands available from the prompt:
<statement> evaluate/run <statement>
:add <filename> ... add module(s) to the current target set
:browse [[*]<module>] display the names defined by <module>
:cd <dir> Interrupted.
Prelude Data.List> :i foldl
foldl :: (a -> b -> a) -> a -> [b] -> a -- Defined in GHC.List
Prelude Data.List> :t (+) . (^)
(+) . (^) :: (Integral b, Num a, Num (b -> a)) => a -> (b -> a) -> b -> a
Prelude Data.List> :q
Leaving GHCi.
[EMAIL PROTECTED]:~>
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1946>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs