-{-# OPTIONS -fffi -cpp #-}
+{-# LANGUAGE CPP, ForeignFunctionInterface #-}
------------------------------------------------------------------------
-- Program for converting .hsc files to .hs files, by converting the
#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 )
-- (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