X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fhsc2hs%2FMain.hs;h=e541e21d1444dabdcad83c79ecc1c2cc7b96b1bc;hb=e796c0f1a48b71be6917da401f5c1cbaf699a87e;hp=a5bd774387f04c2f4d90184d2100ecefc633c069;hpb=d4f77b051a02471b63de9488b204e6c7fb82b45e;p=ghc-hetmet.git diff --git a/utils/hsc2hs/Main.hs b/utils/hsc2hs/Main.hs index a5bd774..e541e21 100644 --- a/utils/hsc2hs/Main.hs +++ b/utils/hsc2hs/Main.hs @@ -1,4 +1,4 @@ -{-# OPTIONS -fffi -cpp #-} +{-# LANGUAGE CPP, ForeignFunctionInterface #-} ------------------------------------------------------------------------ -- Program for converting .hsc files to .hs files, by converting the @@ -42,11 +42,7 @@ import System.IO ( openFile, IOMode(..), hClose ) #endif #if defined(__GLASGOW_HASKELL__) && !defined(BUILD_NHC) -#ifdef USING_COMPAT -import Compat.RawSystem ( rawSystem ) -#else import System.Cmd ( rawSystem ) -#endif #define HAVE_rawSystem #elif __NHC__ >= 117 import System.Cmd ( rawSystem ) @@ -579,8 +575,7 @@ output flags name toks = do -- (called hsc2hs-inplace, generated from hsc2hs.sh) compiler <- case [c | Compiler c <- flags] of [] -> locateGhc "ghc" - [c] -> return c - _ -> onlyOne "compiler" + cs -> return (last cs) linker <- case [l | Linker l <- flags] of [] -> locateGhc compiler