File: knob.cabal

package info (click to toggle)
haskell-knob 0.1.1-10
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 88 kB
  • ctags: 2
  • sloc: haskell: 388; sh: 48; makefile: 2
file content (59 lines) | stat: -rw-r--r-- 1,401 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: knob
version: 0.1.1
license: MIT
license-file: license.txt
author: John Millikin <jmillikin@gmail.com>
maintainer: John Millikin <jmillikin@gmail.com>
build-type: Simple
cabal-version: >= 1.6
category: System
stability: experimental
homepage: https://john-millikin.com/software/knob/
bug-reports: mailto:jmillikin@gmail.com

synopsis: Memory-backed handles
description:
  Create memory-backed 'Handle's, 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)

extra-source-files:
  scripts/common.bash
  scripts/run-coverage
  scripts/run-tests
  --
  tests/knob-tests.cabal
  tests/KnobTests.hs

source-repository head
  type: bazaar
  location: https://john-millikin.com/software/knob/

source-repository this
  type: bazaar
  location: https://john-millikin.com/branches/knob/0.1/
  tag: knob_0.1.1

library
  hs-source-dirs: lib
  ghc-options: -Wall -O2

  build-depends:
      base >= 4.2 && < 5.0
    , bytestring >= 0.9
    , transformers >= 0.2

  exposed-modules:
    Data.Knob