summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorPepe Iborra <mnislaih@gmail.com>2007-09-27 14:15:49 +0000
committerPepe Iborra <mnislaih@gmail.com>2007-09-27 14:15:49 +0000
commit9efeaae7dd6d720b0f44b0a73ed4881d7eb41034 (patch)
treedc26d216f445b71e7a8535ed3af76d59f25dffa4 /compiler
parentbd3922fb7bac1d029d2c8bd311fb9d543120e8ca (diff)
downloadhaskell-9efeaae7dd6d720b0f44b0a73ed4881d7eb41034.tar.gz
Be a bit more flexible in terminal identification for do_bold
In Os X for instance, by default we have TERM=xterm-color MERGE TO STABLE
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ghci/InteractiveUI.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs
index 4d3d08d7c5..ec1f4bf98e 100644
--- a/compiler/ghci/InteractiveUI.hs
+++ b/compiler/ghci/InteractiveUI.hs
@@ -1818,7 +1818,7 @@ findBreakByCoord mb_file (line, col) arr
-- TERM to vt100 for other reasons) we get carets.
-- We really ought to use a proper termcap/terminfo library.
do_bold :: Bool
-do_bold = unsafePerformIO mTerm `elem` ["xterm", "linux"]
+do_bold = (`isPrefixOf` unsafePerformIO mTerm) `any` ["xterm", "linux"]
where mTerm = System.Environment.getEnv "TERM"
`Exception.catch` \e -> return "TERM not set"