Popularity
1.2
Declining
Activity
0.0
-
1
1
0

Monthly Downloads: 31
Programming language: Haskell
License: MIT License
Tags: Data     Concurrency    
Latest version: v0.1.1.2

bitset-word8 alternatives and similar packages

Based on the "Data" category.
Alternatively, view bitset-word8 alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of bitset-word8 or a related project?

Add another 'Data' Package

README

bitset-word8

License: MIT Build Status Hackage Stackage Nightly Stackage LTS

Space efficient set of Word8 and some pre-canned sets useful for parsing HTTP related ByteString. This package is intended to provide O(1) membership test on any subset of ASCII and Latin-1 character set in order to write efficient HTTP related parser.

Creating your own set

You can create your own set by fromList.

myCharSet :: BitSetWord8
myCharSet = fromList [ 'Y', 'y', 'N', 'n' ]

You can create pre-evaluated set using Template Haskell.

{-# LANGUAGE TemplateHaskell #-}
import Language.Haskell.TH.Syntax (Lift, lift)

myPreEvaluatedCharSet :: BitSetWord8
myPreEvaluatedCharSet = $(lift myCharSet)

Example Usage

import Data.Attoparsec.ByteString

-- | Parse RFC7230 token.
token :: Parser ByteString
token = takeWhile1 (member rfc7230TChar)


*Note that all licence references and agreements mentioned in the bitset-word8 README section above are relevant to that project's source code only.