The knob package

[Tags:library, mit]

Create memory-backed 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)


Versions 0.1, 0.1.1
Dependencies base (>=4.2 && <5.0), bytestring (>=0.9), transformers (>=0.2) [details]
License MIT
Author John Millikin <>
Maintainer John Millikin <>
Stability experimental
Category System
Home page
Bug tracker
Source repository head: bzr branch
this: bzr branch -r knob_0.1.1
Uploaded Sun Apr 8 18:48:04 UTC 2012 by JohnMillikin
Distributions Debian:0.1.1, LTSHaskell:0.1.1, NixOS:0.1.1, Stackage:0.1.1, Tumbleweed:0.1.1
Downloads 2688 total (6 in the last 30 days)
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]




Maintainer's Corner

For package maintainers and hackage trustees