{-# OPTIONS -fglasgow-exts #-}
------------------------------------------------------------------------
--- $Id: Main.hs,v 1.45 2003/02/11 04:32:06 sof Exp $
+-- $Id: Main.hs,v 1.47 2003/05/20 11:07:54 stolz 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.
writeFile cProgName $
concatMap outFlagHeaderCProg flags++
concatMap outHeaderCProg specials++
- "\nint main (void)\n{\n"++
+ "\nint main (int argc, char *argv [])\n{\n"++
outHeaderHs flags (if needsH then Just outHName else Nothing) specials++
outHsLine (SourcePos name 0)++
concatMap outTokenHs toks++
where
len = 2048::Int -- Plenty, PATH_MAX is 512 under Win32.
-foreign import stdcall unsafe "GetModuleFileNameA"
+foreign import stdcall "GetModuleFileNameA" unsafe
getModuleFileName :: Ptr () -> CString -> Int -> IO Int32
#else