[project @ 2002-10-29 10:50:53 by simonpj]
authorsimonpj <unknown>
Tue, 29 Oct 2002 10:50:54 +0000 (10:50 +0000)
committersimonpj <unknown>
Tue, 29 Oct 2002 10:50:54 +0000 (10:50 +0000)
Make imports work for pre-504

ghc/utils/ghc-pkg/Main.hs
ghc/utils/hsc2hs/Main.hs

index cf3adc9..0c9d2f0 100644 (file)
@@ -1,7 +1,7 @@
 {-# OPTIONS -fglasgow-exts #-}
 
 -----------------------------------------------------------------------------
--- $Id: Main.hs,v 1.29 2002/10/27 10:38:32 mthomas Exp $
+-- $Id: Main.hs,v 1.30 2002/10/29 10:50:53 simonpj Exp $
 --
 -- Package management tool
 -----------------------------------------------------------------------------
@@ -34,8 +34,13 @@ import ParsePkgConfLite
 #include "../../includes/config.h"
 
 #ifdef mingw32_HOST_OS
-import Foreign.C.String
 import Foreign
+
+#if __GLASGOW_HASKELL__ >= 504
+import Foreign.C.String
+#else
+import CString
+#endif
 #endif
 
 main = do
index 3a41426..22b54da 100644 (file)
@@ -1,7 +1,7 @@
 {-# OPTIONS -fglasgow-exts #-}
 
 ------------------------------------------------------------------------
--- $Id: Main.hs,v 1.42 2002/10/28 10:11:17 simonpj Exp $
+-- $Id: Main.hs,v 1.43 2002/10/29 10:50:54 simonpj 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.
@@ -27,11 +27,17 @@ import List          (intersperse)
 #include "../../includes/config.h"
 
 #ifdef mingw32_HOST_OS
-import Foreign.C.String
 import Foreign
+
+#if __GLASGOW_HASKELL__ >= 504
+import Foreign.C.String
+#else
+import CString
+#endif
 #endif
 
 
+
 version :: String
 version = "hsc2hs-0.65"