>>>>> "TLB" == Thomas L Bevan <[EMAIL PROTECTED]> writes:
TLB> If anyone ports this to work with GHC6.0 please let TLB> us know. Tom The patch below allows me to build hws with ghc-6.0.1 and run it without plugins. However when trying to run it with loading modules I see: hws-wp% sudo ./src/hws -d . /home/petersen/haskell/haskell-libs/hws-wp/hws-wp/plugins/DirPlugin.o: unknown symbol `SystemziPosixziFiles_isDirectory_closure' Fail: user error Reason: resolveFunctions failed?False and similarly for the other modules. Perhaps the linking isn't quite, right? Jens Index: hws-wp/src/AccessLogger.hs =================================================================== RCS file: /cvsroot/haskell-libs/libs/hws-wp/hws-wp/src/AccessLogger.hs,v retrieving revision 1.1 diff -u -r1.1 AccessLogger.hs --- hws-wp/src/AccessLogger.hs 16 Feb 2003 14:55:28 -0000 1.1 +++ hws-wp/src/AccessLogger.hs 5 Nov 2003 04:09:34 -0000 @@ -45,7 +45,7 @@ import IO import Char (toLower) import IOExts hiding (trace) -import Time +import System.Time import Network.BSD import Network.Socket import Exception Index: hws-wp/src/Core.hs =================================================================== RCS file: /cvsroot/haskell-libs/libs/hws-wp/hws-wp/src/Core.hs,v retrieving revision 1.1 diff -u -r1.1 Core.hs --- hws-wp/src/Core.hs 16 Feb 2003 14:55:28 -0000 1.1 +++ hws-wp/src/Core.hs 5 Nov 2003 04:09:34 -0000 @@ -15,6 +15,7 @@ fileAccess) import Exception (tryJust, ioErrors) import System.IO +import Control.Exception (bracket) import Control.Monad import Control.Monad.Trans Index: hws-wp/src/Main.hs =================================================================== RCS file: /cvsroot/haskell-libs/libs/hws-wp/hws-wp/src/Main.hs,v retrieving revision 1.1 diff -u -r1.1 Main.hs --- hws-wp/src/Main.hs 16 Feb 2003 14:55:28 -0000 1.1 +++ hws-wp/src/Main.hs 5 Nov 2003 04:09:34 -0000 @@ -51,7 +51,7 @@ import Posix import Network.BSD import IO hiding (bracket) -import Exception +import Control.Exception import Monad import IOExts hiding (trace) import Control.Concurrent @@ -212,7 +212,7 @@ -- server. If we receive a restart signal (from a SIGHUP), then we -- re-read the configuration file. topServer conf ps = do - catchError + Control.Exception.catch (do unBlockSignals sigsToBlock unblock $ do server conf ps) @@ -233,7 +233,7 @@ -- open the server socket and start accepting connections server conf ps = do proto <- getProtocolNumber "tcp" - Exception.bracket + bracket (socket AF_INET Stream proto) (\sock -> sClose sock) (\sock -> do @@ -247,7 +247,7 @@ acceptConnections conf ps sock = do (h, SockAddrInet port haddr) <- accept sock forkIO ( (talk conf ps h haddr `finally` (hClose h)) - `Exception.catch` + `Control.Exception.catch` (\e -> trace ("servlet died: " ++ show e) (return ())) ) acceptConnections conf ps sock @@ -277,11 +277,7 @@ else return ()) return Nothing) ) -#if __GLASGOW_HASKELL__ < 409 ([EMAIL PROTECTED] -> -#else - (\e@(IOException io) -> -#endif if isEOFError e then trace "EOF from client" $ return Nothing else do logError ("request: " ++ showIOError io) Index: hws-wp/src/Makefile =================================================================== RCS file: /cvsroot/haskell-libs/libs/hws-wp/hws-wp/src/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- Makefile 16 Feb 2003 14:55:28 -0000 1.1 +++ Makefile 5 Nov 2003 06:14:47 -0000 @@ -14,13 +14,13 @@ # Change this to wherever yours are, I don't know what the variable # is called in the fptools mk stuff -GHCDIR = /usr/lib/ghc-5.04.2 +GHCDIR = /usr/lib/ghc-6.0.1 LD_OPTS += -optl-export-dynamic -L$(RTLDIR) HS_OBJS += -ldl -lHSrts -lHSlang -lHSposix -lHSnetwork # Link in the objects. Yes it takes ages to compile, but that's better # than it taking ages to start the program! HS_OBJS += $(GHCDIR)/HSbase.o $(GHCDIR)/HSlang.o $(GHCDIR)/HSposix.o $(GHCDIR)/HSnetwork.o -HS_OBJS += $(RTLDIR)/libRuntimeLoader.a - +#HS_OBJS += $(RTLDIR)/libRuntimeLoader.a +HS_OBJS += $(RTLDIR)/*.o Index: hws-wp/src/Util.hs =================================================================== RCS file: /cvsroot/haskell-libs/libs/hws-wp/hws-wp/src/Util.hs,v retrieving revision 1.1 diff -u -r1.1 Util.hs --- hws-wp/src/Util.hs 16 Feb 2003 14:55:28 -0000 1.1 +++ hws-wp/src/Util.hs 5 Nov 2003 04:09:34 -0000 @@ -38,7 +38,7 @@ import Network.Socket hiding (accept) import qualified Network.Socket -import Time +import System.Time import Locale import Char import IO @@ -51,6 +51,7 @@ #else import GHC.Base import GHC.Conc +import GHC.Exception import GHC.IOBase #endif @@ -148,12 +149,12 @@ killThread timeout return result ) - `catch` + `catchException` ( \exception -> case exception of ErrorCall "__timeout" -> on_timeout _other -> do killThread timeout - throw exception ) + throwIO exception ) forkIOIgnoreExceptions :: IO () -> IO ThreadId forkIOIgnoreExceptions action = IO $ \ s -> Index: runtime_loader/GHCLibraryPath.hs =================================================================== RCS file: /cvsroot/haskell-libs/libs/hws-wp/runtime_loader/GHCLibraryPath.hs,v retrieving revision 1.1 diff -u -r1.1 GHCLibraryPath.hs --- runtime_loader/GHCLibraryPath.hs 16 Feb 2003 14:55:29 -0000 1.1 +++ runtime_loader/GHCLibraryPath.hs 5 Nov 2003 04:09:34 -0000 @@ -1,4 +1,4 @@ module GHCLibraryPath (ghcLibraryPath) where -ghcLibraryPath = "/usr/lib/ghc-5.04/" +ghcLibraryPath = "/usr/lib/ghc-6.0.1/" _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell