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)


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 <>
Category System
Home page
Bug tracker
Source repository head: bzr branch
this: bzr branch -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, Tumbleweed:0.1.1
Downloads 2906 total (68 in the last 30 days)
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees