[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:52:12 UTC 2010


The following commit has been merged in the master branch:
commit eae4ddc675b02a68b7ca918ec16d5744bfad3bbf
Author: John Goerzen <jgoerzen at complete.org>
Date:   Tue Dec 21 04:20:32 2004 +0100

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

diff --git a/ChangeLog b/ChangeLog
index dc3930a..e189f5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,19 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
 #
 
+2004-12-20 21:20:32 GMT	John Goerzen <jgoerzen at complete.org>	patch-109
+
+    Summary:
+      Checkpointing (compiles)
+    Revision:
+      missingh--head--0.7--patch-109
+
+
+    modified files:
+     ChangeLog libsrc/MissingH/IO/HVFS.hs
+     libsrc/MissingH/IO/HVFS/InstanceHelpers.hs
+
+
 2004-12-20 21:07:51 GMT	John Goerzen <jgoerzen at complete.org>	patch-108
 
     Summary:
diff --git a/libsrc/MissingH/IO/HVFS.hs b/libsrc/MissingH/IO/HVFS.hs
index 9733eda..777c648 100644
--- a/libsrc/MissingH/IO/HVFS.hs
+++ b/libsrc/MissingH/IO/HVFS.hs
@@ -34,6 +34,7 @@ Copyright (c) 2004 John Goerzen, jgoerzen\@complete.org
 
 module MissingH.IO.HVFS(-- * Implementation Classes \/ Types
                         HVFS(..), HVFSStat(..), HVFSStatEncap(..),
+                        HVFSOpenable(..),
                         -- * Re-exported types from other modules
                         FilePath, DeviceID, FileID, FileMode, LinkCount,
                         UserID, GroupID, FileOffset, EpochTime,
diff --git a/libsrc/MissingH/IO/HVFS/InstanceHelpers.hs b/libsrc/MissingH/IO/HVFS/InstanceHelpers.hs
index 18442f2..2eae3f4 100644
--- a/libsrc/MissingH/IO/HVFS/InstanceHelpers.hs
+++ b/libsrc/MissingH/IO/HVFS/InstanceHelpers.hs
@@ -36,7 +36,7 @@ module MissingH.IO.HVFS.InstanceHelpers(-- * HVFSStat objects
                                         SimpleStat(..),
                                         -- * HVFS objects & types
                                         MemoryVFS,
-                                        newMemoryVFS,
+                                        newMemoryVFS, newMemoryVFSRef,
                                         MemoryNode,
                                         MemoryEntry(..),
                                        )
@@ -47,6 +47,8 @@ import MissingH.Path
 import MissingH.Path.NameManip
 import Control.Monad.Error
 import System.IO.Error
+import System.IO
+import MissingH.IO.HVIO
 
 {- | A simple class that assumes that everything is either a file
 or a directory. -}
@@ -147,3 +149,12 @@ instance HVFS MemoryVFS where
                                   "Can't list contents of a file"
                                   (Just fp)
                 MemoryDirectory c -> return $ map fst c
+
+instance HVFSOpenable MemoryVFS StreamReader where
+    vOpen x fp (ReadMode) = 
+        do elem <- getMelem x fp
+           case elem of 
+                MemoryDirectory _ -> vRaiseError x doesNotExistErrorType
+                                      "Can't open a directory"
+                                      (Just fp)
+                MemoryFile y -> newStreamReader y

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list