-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Memory map immutable and mutable vectors -- -- Memory map immutable and mutable vectors. @package vector-mmap @version 0.0.2 module Data.Vector.Storable.MMap -- | Mode of mapping. Four cases are supported. data Mode :: * -- | file is mapped read-only, file must exist ReadOnly :: Mode -- | file is mapped read-write, file must exist ReadWrite :: Mode -- | file is mapped read-write, but changes aren't propagated to disk, file -- must exist WriteCopy :: Mode -- | file is mapped read-write, if file does not exist it will be created -- with default permissions, region parameter specifies size, if file -- size is lower it will be extended with zeros ReadWriteEx :: Mode -- | Map a file into memory as a mutable vector. unsafeMMapMVector :: Storable a => FilePath -> Mode -> Maybe (Int64, Int) -> IO (MVector (PrimState IO) a) -- | Map a file into memory (ReadOnly mode) as an immutable vector. unsafeMMapVector :: Storable a => FilePath -> Maybe (Int64, Int) -> IO (Vector a)