[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

John Goerzen jgoerzen at complete.org
Fri Apr 23 14:51:42 UTC 2010


The following commit has been merged in the master branch:
commit c8a1121abe1f677f24c1d6ee78fc837de106a079
Author: John Goerzen <jgoerzen at complete.org>
Date:   Mon Dec 20 23:20:23 2004 +0100

    Checkpointing, compiles
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--0.7--patch-95)

diff --git a/ChangeLog b/ChangeLog
index 0527104..3707418 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,18 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
 #
 
+2004-12-20 16:20:23 GMT	John Goerzen <jgoerzen at complete.org>	patch-95
+
+    Summary:
+      Checkpointing, compiles
+    Revision:
+      missingh--head--0.7--patch-95
+
+
+    modified files:
+     ChangeLog libsrc/MissingH/IO/HVFS.hs
+
+
 2004-12-20 16:15:03 GMT	John Goerzen <jgoerzen at complete.org>	patch-94
 
     Summary:
diff --git a/libsrc/MissingH/IO/HVFS.hs b/libsrc/MissingH/IO/HVFS.hs
index 033722d..d202e4c 100644
--- a/libsrc/MissingH/IO/HVFS.hs
+++ b/libsrc/MissingH/IO/HVFS.hs
@@ -51,6 +51,10 @@ import System.Directory
 
 data HVFSStatEncap = forall a. HVFSStat a => HVFSStatEncap a
 
+{- | Evaluating types of files and information about them.
+
+This corresponds to the System.Posix.Types.FileStatus type.
+-}
 class HVFSStat a where
     vDeviceID :: a -> DeviceID
     vFileID :: a -> FileID
@@ -91,6 +95,9 @@ un-implemented.
 
 You should always provide at least a 'vGetFileStatus' call, and almost
 certainly several of the others.
+
+Most of these functions correspond to functions in System.Directory or
+System.Posix.Files.  Please see detailed documentation on them there.
  -}
 class HVFS a where
     vGetCurrentDirectory :: a -> IO FilePath
@@ -106,6 +113,7 @@ class HVFS a where
     vGetFileStatus :: a -> FilePath -> IO HVFSStatEncap
     vGetSymbolicLinkStatus :: a -> FilePath -> IO HVFSStatEncap
     vGetModificationTime :: a -> FilePath -> IO ClockTime
+    {- | Raise an error relating to actions on this class. -}
     vRaiseError :: a -> IOErrorType -> String -> Maybe FilePath -> IO c
 
     vGetModificationTime fs fp = 
@@ -140,8 +148,8 @@ eh :: HVFS a => a -> String -> IO c
 eh fs desc = vRaiseError fs illegalOperationErrorType 
              (desc ++ " is not implemented in this HVFS class") Nothing
 
-class (HVFS a, HVIOGeneric c) => HVFSOpenable a b c where
-    vOpen :: a -> FilePath -> IO c
+class (HVFS a, HVIOGeneric c) => HVFSOpenable a c where
+    vOpen :: a -> FilePath -> IOMode -> IO c
 
 ----------------------------------------------------------------------
 -- Standard implementations
@@ -183,3 +191,6 @@ instance HVFS SystemFS where
     vGetFileStatus _ fp = getFileStatus fp >>= return . HVFSStatEncap
     vGetSymbolicLinkStatus _ fp = getSymbolicLinkStatus fp >>= return . HVFSStatEncap
     vGetModificationTime _ = getModificationTime
+
+instance HVFSOpenable SystemFS Handle where
+    vOpen _ fp iomode = openFile fp iomode

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list