File: attoparsec-enumerator.cabal

package info (click to toggle)
haskell-attoparsec-enumerator 0.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 56 kB
  • sloc: haskell: 55; makefile: 2
file content (61 lines) | stat: -rw-r--r-- 1,657 bytes parent folder | download
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
60
61
name: attoparsec-enumerator
version: 0.3.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: Text, Parsing, Enumerator
stability: experimental
homepage: https://john-millikin.com/software/attoparsec-enumerator/
bug-reports: mailto:jmillikin@gmail.com

synopsis: Pass input from an enumerator to an Attoparsec parser.
description:
  This library allows an Attoparsec parser to receive input incrementally
  from an enumerator. This could be used for parsing large files, or
  implementing binary network protocols.
  .
  > (-# LANGUAGE OverloadedStrings #-)
  >
  > import Control.Applicative
  > import Data.Attoparsec
  > import Data.Attoparsec.Enumerator
  > import Data.Enumerator
  > import Data.Enumerator.Binary (enumHandle)
  > import Data.Enumerator.List
  > import System.IO
  >
  > parser = string "foo" <|> string "bar"
  >
  > main = do
  >     xy <- run_ (enumHandle 1 stdin $$ do
  >         x <- iterParser parser
  >         y <- iterParser parser
  >         return (x, y))
  >     print xy


source-repository head
  type: bazaar
  location: https://john-millikin.com/branches/attoparsec-enumerator/0.3/

source-repository this
  type: bazaar
  location: https://john-millikin.com/branches/attoparsec-enumerator/0.3/
  tag: attoparsec-enumerator_0.3.1

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

  build-depends:
      base >= 4.0 && < 5.0
    , attoparsec >= 0.10 && < 0.11
    , bytestring >= 0.9
    , enumerator >= 0.4 && < 0.5
    , text

  exposed-modules:
    Data.Attoparsec.Enumerator