From 5527bc59052caeb5d03cc24a972edacb32ccd9c8 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 29 Sep 2006 10:27:39 +0000 Subject: [PATCH] :edit runs notepad by default on Windows --- compiler/ghci/InteractiveUI.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index 909eaec..0685168 100644 --- a/compiler/ghci/InteractiveUI.hs +++ b/compiler/ghci/InteractiveUI.hs @@ -58,7 +58,8 @@ import Config import StaticFlags ( opt_IgnoreDotGhci ) import Linker ( showLinkerState, linkPackages ) import Util ( removeSpaces, handle, global, toArgs, - looksLikeModuleName, prefixMatch, sortLe ) + looksLikeModuleName, prefixMatch, sortLe, + joinFileName ) #ifndef mingw32_HOST_OS import System.Posix @@ -68,6 +69,7 @@ import System.Posix #else import GHC.ConsoleHandler ( flushConsole ) import System.Win32 ( setConsoleCP, setConsoleOutputCP ) +import qualified System.Win32 #endif #ifdef USE_READLINE @@ -266,9 +268,8 @@ jumpFunction session@(Session ref) (I# idsPtr) hValues location b findEditor = do getEnv "EDITOR" `IO.catch` \_ -> do -#if 0 - -- ToDo: mingw32_HOST_OS - win <- getWindowsDirectory +#if mingw32_HOST_OS + win <- System.Win32.getWindowsDirectory return (win `joinFileName` "notepad.exe") #else return "" -- 1.7.10.4