From 5c8d34fba9ffae17645332d492e16342b2b4d5fc Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Sat, 3 Sep 2005 04:45:56 +0000 Subject: [PATCH] No need for -cpp. Use -fglasgow-exts only where needed --- AltData/Dynamic.hs | 4 ++-- AltData/Typeable.hs | 2 +- System/Eval/Haskell.hs | 10 +++++----- System/Eval/Utils.hs | 1 - System/MkTemp.hs | 2 +- System/Plugins/Load.hs | 1 - System/Plugins/PackageAPI.hs | 1 - System/Plugins/ParsePkgConfCabal.hs | 2 +- System/Plugins/ParsePkgConfLite.hs | 2 +- System/Plugins/Process.hs | 1 - System/Plugins/Utils.hs | 1 - 11 files changed, 11 insertions(+), 16 deletions(-) diff --git a/AltData/Dynamic.hs b/AltData/Dynamic.hs index 5c05405..0c65aa4 100644 --- a/AltData/Dynamic.hs +++ b/AltData/Dynamic.hs @@ -1,5 +1,5 @@ -{-# OPTIONS -fglasgow-exts -cpp #-} ------------------------------------------------------------------------------ +{-# OPTIONS -fglasgow-exts #-} +-- -- | -- Module : Data.Dynamic -- Copyright : (c) The University of Glasgow 2001 diff --git a/AltData/Typeable.hs b/AltData/Typeable.hs index a14e335..d7e4a58 100644 --- a/AltData/Typeable.hs +++ b/AltData/Typeable.hs @@ -1,4 +1,4 @@ -{-# OPTIONS -cpp -fglasgow-exts -fno-implicit-prelude #-} +{-# OPTIONS -fglasgow-exts #-} -- -- Copyright (C) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons -- diff --git a/System/Eval/Haskell.hs b/System/Eval/Haskell.hs index 1c364e7..42dc58d 100644 --- a/System/Eval/Haskell.hs +++ b/System/Eval/Haskell.hs @@ -53,8 +53,8 @@ import Data.Map as Map import System.IO import System.Directory -import Foreign.C -import Foreign +-- import Foreign.C +-- import Foreign -- -- ok. the idea is: the have either installed the library, in which case @@ -176,10 +176,10 @@ typeOf src mods = do status <- make tmpf cmdline ty <- case status of MakeSuccess _ obj -> do - m_v <- load obj [pwd] loadpath symbol + m_v <- load obj [pwd] loadpath symbol :: IO (LoadStatus Dynamic) case m_v of - LoadFailure _ -> return "" - LoadSuccess _ (v::Dynamic) -> return $ (init . tail) $ show v + LoadFailure _ -> return "" + LoadSuccess _ v -> return $ (init . tail) $ show v MakeFailure err -> mapM_ putStrLn err >> return [] makeCleaner tmpf diff --git a/System/Eval/Utils.hs b/System/Eval/Utils.hs index a046b7f..9844ff4 100644 --- a/System/Eval/Utils.hs +++ b/System/Eval/Utils.hs @@ -1,4 +1,3 @@ -{-# OPTIONS -fglasgow-exts -fffi -cpp #-} -- -- Copyright (C) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons -- diff --git a/System/MkTemp.hs b/System/MkTemp.hs index f9db73d..1b0a9f7 100644 --- a/System/MkTemp.hs +++ b/System/MkTemp.hs @@ -1,4 +1,4 @@ -{-# OPTIONS -cpp -fffi -fglasgow-exts #-} +{-# OPTIONS -fglasgow-exts #-} -- -- glaexts for I# ops -- diff --git a/System/Plugins/Load.hs b/System/Plugins/Load.hs index 63da957..9250e39 100644 --- a/System/Plugins/Load.hs +++ b/System/Plugins/Load.hs @@ -1,4 +1,3 @@ -{-# OPTIONS -#include "Linker.h" #-} {-# OPTIONS -fglasgow-exts #-} -- -- Copyright (C) 2004-5 Don Stewart - http://www.cse.unsw.edu.au/~dons diff --git a/System/Plugins/PackageAPI.hs b/System/Plugins/PackageAPI.hs index 3b65994..1999ad8 100644 --- a/System/Plugins/PackageAPI.hs +++ b/System/Plugins/PackageAPI.hs @@ -1,4 +1,3 @@ -{-# OPTIONS -cpp #-} -- -- Copyright (C) 2005 Sean Seefried - http://www.cse.unsw.edu.au/~sseefried -- diff --git a/System/Plugins/ParsePkgConfCabal.hs b/System/Plugins/ParsePkgConfCabal.hs index 7b4b371..eba427e 100644 --- a/System/Plugins/ParsePkgConfCabal.hs +++ b/System/Plugins/ParsePkgConfCabal.hs @@ -1,4 +1,4 @@ -{-# OPTIONS -fglasgow-exts -cpp #-} +{-# OPTIONS -fglasgow-exts #-} {-# OPTIONS -w #-} module System.Plugins.ParsePkgConfCabal ( diff --git a/System/Plugins/ParsePkgConfLite.hs b/System/Plugins/ParsePkgConfLite.hs index c6cf6d5..a2c569d 100644 --- a/System/Plugins/ParsePkgConfLite.hs +++ b/System/Plugins/ParsePkgConfLite.hs @@ -1,4 +1,4 @@ -{-# OPTIONS -fglasgow-exts -cpp #-} +{-# OPTIONS -fglasgow-exts #-} {-# OPTIONS -w #-} module System.Plugins.ParsePkgConfLite ( diff --git a/System/Plugins/Process.hs b/System/Plugins/Process.hs index 5a39a93..2d35ca0 100644 --- a/System/Plugins/Process.hs +++ b/System/Plugins/Process.hs @@ -1,4 +1,3 @@ -{-# OPTIONS -cpp #-} -- -- | A Posix.popen compatibility mapping. -- diff --git a/System/Plugins/Utils.hs b/System/Plugins/Utils.hs index 8009fb8..d1a5673 100644 --- a/System/Plugins/Utils.hs +++ b/System/Plugins/Utils.hs @@ -1,4 +1,3 @@ -{-# OPTIONS -cpp #-} -- -- Copyright (C) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons --