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

Versions 0.1, 0.1.1
Dependencies base (>=4.2 && <5.0), bytestring (==0.9.*), transformers (==0.2.*) [details]
License MIT
Author John Millikin <jmillikin@gmail.com>
Maintainer John Millikin <jmillikin@gmail.com>
Stability experimental
Category System
Home page https://john-millikin.com/software/knob/
Bug tracker mailto:jmillikin@gmail.com
Source repository head: bzr branch https://john-millikin.com/software/knob/
this: bzr branch https://john-millikin.com/branches/knob/0.1/ -r knob_0.1
Uploaded Sun Oct 9 01:18:49 UTC 2011 by JohnMillikin
Distributions Debian:0.1.1, LTSHaskell:0.1.1, NixOS:0.1.1, Stackage:0.1.1
Downloads 2661 total (3 in the last 30 days)
Votes
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees