[GHC] #1704: Exception when using the :list command in the GHCI
debugger
GHC
trac at galois.com
Tue Sep 18 12:42:42 EDT 2007
#1704: Exception when using the :list command in the GHCI debugger
-------------------------------+--------------------------------------------
Reporter: Olivier Boudry | Owner:
Type: bug | Status: new
Priority: high | Milestone: 6.8.1
Component: GHCi | Version: 6.8
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Windows | Testcase:
Architecture: x86 |
-------------------------------+--------------------------------------------
Comment (by Olivier Boudry):
The only getEnv "TERM" in the GHC source is line 1827 of the
compiler/ghci/InteractiveUI.hs file.
{{{
do_bold :: Bool
do_bold = unsafePerformIO (System.Environment.getEnv "TERM") `elem`
["xterm", "linux"]
}}}
adding some exception checking there should fix the problem:
{{{
do_bold :: Bool
do_bold = unsafePerformIO (Control.Exception.catch
(System.Environment.getEnv "TERM") (\e -> return "other") `elem`
["xterm", "linux"]
}}}
Cheers,
Olivier.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1704>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list