From: malcolm Date: Wed, 5 Jan 2005 11:17:46 +0000 (+0000) Subject: [project @ 2005-01-05 11:17:46 by malcolm] X-Git-Tag: Initial_conversion_from_CVS_complete~1301 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1bd232865b6ee603ffc833f9c3eab96f565088fa;p=ghc-hetmet.git [project @ 2005-01-05 11:17:46 by malcolm] `rawSystem` is only available in GHC. --- diff --git a/ghc/utils/hsc2hs/Main.hs b/ghc/utils/hsc2hs/Main.hs index 0ad0a03..ede930b 100644 --- a/ghc/utils/hsc2hs/Main.hs +++ b/ghc/utils/hsc2hs/Main.hs @@ -1,7 +1,7 @@ {-# OPTIONS -fffi -cpp #-} ------------------------------------------------------------------------ --- $Id: Main.hs,v 1.61 2005/01/05 10:26:45 simonmar Exp $ +-- $Id: Main.hs,v 1.62 2005/01/05 11:17:46 malcolm Exp $ -- -- Program for converting .hsc files to .hs files, by converting the -- file into a C program which is run to generate the Haskell source. @@ -17,8 +17,6 @@ import System.Console.GetOpt import GetOpt #endif -import Compat.RawSystem ( rawSystem ) - import System (getProgName, getArgs, ExitCode(..), exitWith, system) import Directory (removeFile,doesFileExist) import Monad (MonadPlus(..), liftM, liftM2, when) @@ -36,6 +34,12 @@ import CString #endif +#ifdef __GLASGOW_HASKELL__ +import Compat.RawSystem ( rawSystem ) +#else +rawSystem prog args = system (prog++unwords args) +#endif + version :: String version = "hsc2hs version 0.66\n"