diff options
author | pepeiborra@gmail.com <unknown> | 2010-11-15 22:36:23 +0000 |
---|---|---|
committer | pepeiborra@gmail.com <unknown> | 2010-11-15 22:36:23 +0000 |
commit | add9b7f13aad3a6ec5fdb4512c79ee9c5d95b3d4 (patch) | |
tree | bf791d3cf255874763f03876a980b14240865164 /ghc | |
parent | 6bb8d64a971afce310df3349e8767b790c2845ee (diff) | |
download | haskell-add9b7f13aad3a6ec5fdb4512c79ee9c5d95b3d4.tar.gz |
Fix bug #3165 (:history throws irrefutable pattern failed)
I ran across this bug and took the time to fix it, closing
a long time due TODO in InteractiveEval.hs
Instead of looking around to find the enclosing declaration
of a tick, this patch makes use of the information already collected during the
coverage desugaring phase
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/InteractiveUI.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index 03d0370ddb..552b61cdc3 100644 --- a/ghc/InteractiveUI.hs +++ b/ghc/InteractiveUI.hs @@ -1963,11 +1963,11 @@ historyCmd arg _ -> do spans <- mapM GHC.getHistorySpan took let nums = map (printf "-%-3d:") [(1::Int)..] - names = map GHC.historyEnclosingDecl took + names = map GHC.historyEnclosingDecls took printForUser (vcat(zipWith3 (\x y z -> x <+> y <+> z) (map text nums) - (map (bold . ppr) names) + (map (bold . hcat . punctuate colon . map text) names) (map (parens . ppr) spans))) liftIO $ putStrLn $ if null rest then "<end of history>" else "..." |