Compiling hws with ghc 6
Alistair Bayley
alistair@abayley.org
Mon, 9 Jun 2003 21:51:00 +0100
I'm trying to compile the haskell web server (from the haskell-libs project
at sf.net) with ghc6 and I'm stuck on the last function in Util.hs:
statMaybe filename = do
maybe_stat <- tryJust ioErrors (getFileStatus filename)
case maybe_stat of
Left e -> do
errno <- getErrorCode
if errno == eNOENT
then return Nothing
else ioError e
Right stat ->
return (Just stat)
What are the equivalents for getFileStatus and getErrorCode these days?
I suppose Foreign.C.Error.getErrno might substitute for getErrorCode, but I'm
stumped on getFileStatus.