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)

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>
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.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, Tumbleweed:0.1.1
Downloads 3034 total (52 in the last 30 days)
Votes
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees