The knob package

[Tags: library, mit]

Create memory-backed IO.Handles, referencing virtual files. This is mostly useful for testing Handle-based APIs without having to interact with the filesystem.

 import Data.ByteString (pack)
 import Data.Knob
 import System.IO

 main = do
     knob <- newKnob (pack [])
     h <- newFileHandle knob "test.txt" WriteMode
     hPutStrLn h "Hello world!"
     hClose h
     bytes <- Data.Knob.getContents knob
     putStrLn ("Wrote bytes: " ++ show bytes)

Properties

Versions0.1, 0.1.1
Dependenciesbase (>=4.2 && <5.0), bytestring (==0.9.*), transformers (==0.2.*)
LicenseMIT
AuthorJohn Millikin <jmillikin@gmail.com>
MaintainerJohn Millikin <jmillikin@gmail.com>
Stabilityexperimental
CategorySystem
Home pagehttps://john-millikin.com/software/knob/
Bug trackermailto:jmillikin@gmail.com
Source repositoryhead: bzr branch https://john-millikin.com/software/knob/
this: bzr branch https://john-millikin.com/branches/knob/0.1/ -r knob_0.1
Upload dateSun Oct 9 01:18:49 UTC 2011
Uploaded byJohnMillikin
DistributionsDebian:0.1.1, NixOS:0.1.1
Downloads1113 total (138 in last 30 days)

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees