[project @ 2004-08-18 09:23:19 by malcolm]
authormalcolm <unknown>
Wed, 18 Aug 2004 09:23:19 +0000 (09:23 +0000)
committermalcolm <unknown>
Wed, 18 Aug 2004 09:23:19 +0000 (09:23 +0000)
Add versions of getHomeDirectory and getAppUserDataDirectory for nhc98.
(Note: implementation still missing for Hugs.)

System/Directory.hs

index 69acc08..fa6265b 100644 (file)
@@ -60,6 +60,11 @@ module System.Directory
 
 #ifdef __NHC__
 import Directory
+getHomeDirectory :: IO FilePath
+getHomeDirectory = getEnv "HOME"
+getAppUserDataDirectory :: String -> IO FilePath
+getAppUserDataDirectory appName = do path <- getEnv "HOME"
+                                     return (path++'/':'.':appName)
 #elif defined(__HUGS__)
 import Hugs.Directory
 #else