From 1ae32688ab2ead820a20662cf05128b21944e144 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Mon, 2 Jul 2007 10:26:51 +0000 Subject: [PATCH] Print the right usage message The logic for printing the ghc and ghci usage messages was inverted. However, the ghci case will never actually happen with the current code, as we print a usage message when cli_mode == ShowUsage and choose the ghci usage message if cli_mode == DoInteractive. This should be fixed as part of a larger options handling overhaul. --- compiler/main/Main.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/main/Main.hs b/compiler/main/Main.hs index ec1d569..c9d723d 100644 --- a/compiler/main/Main.hs +++ b/compiler/main/Main.hs @@ -444,8 +444,8 @@ showVersion = do showGhcUsage dflags cli_mode = do let usage_path - | DoInteractive <- cli_mode = ghcUsagePath dflags - | otherwise = ghciUsagePath dflags + | DoInteractive <- cli_mode = ghciUsagePath dflags + | otherwise = ghcUsagePath dflags usage <- readFile usage_path dump usage exitWith ExitSuccess -- 1.7.10.4