Hoogle Search
Within LTS Haskell 24.52 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
type family
Plus (a :: BinP) (b :: BinP) :: BinPbin Data.Type.BinP No documentation available.
PartialResult :: BinList a -> Decoded a -> Decoded abinary-list Data.BinaryList.Serialize Partial binary list, and rest of decoded input.
-
This library provide parsec/attoparsec style parsing combinators for binary package. By default, this module export combinators in Data.Binary.Get, Data.Binary.Parser.Word8 and Data.Binary.Parser.Numeric, for additional ASCII char parser, please check Data.Binary.Parser.Char8 module. The behaviour of parsers here is different to that of the similarly-named parser in Parsec, as this one is all-or-nothing. To illustrate the difference, the following parser will fail under Parsec given an input of "for":
string "foo" <|> string "for"
The reason for its failure is that the first branch is a partial match, and will consume the letters 'f' and 'o' before failing. In binary-parsers, the above parser will succeed on that input, because the failed first branch will consume nothing. There're some redundant combinators get removed, for example:choice == asum count == replicateM atEnd == isEmpty take == getByteString many1 == some
For fast byte set operations, please use charset package. It's recommanded to use parseOnly, parseDetail... functions to run your parsers since these functions are faster than binary's counter part by avoiding a small constant overhead. Check parse for detail.A few words on performance and backtracking
There's a common belief that parsers which support backtracking are slow, but it's not neccessarily true in binary, because binary doesn't do book keeping if you doesn't use <|>, lookAhead or their friends. Combinators in this library like peek, string... also try to avoid backtracking so it's faster to use them rather than do backtracking yourself, for example, peek is faster than lookAhead getWord8. In practice, protocols are often designed to avoid backtracking. For example, if you have following parser:branch1 <|> branch2 <|> (skipN 1 >> branch3)
And if you can select the right branch just by looking ahead one byte, then you can rewrite it to:w <- peek if | w == b1 -> branch1 | w == b2 -> branch2 | w == b3 -> skipN 1 >> branch3
Binary performs as fast as a non-backtracking parser as long as you construct your parser without using backtracking. And sometime backtracking is indeed neccessary, for example scientifically is almost impossible to implement correctly if you don't do backtracking. -
binary-parsers Data.Binary.Parser Alias to Get for attoparsec compatibility.
-
No documentation available.
-
bits-extra Data.Bits.Pdep Bitwise parallel deposit. Deposits bits from the source at the locations described by the mask. Copies lower order bits from src to mask 1-bit locations in the return value; mask 0-bit locations in the return value will be cleared.
>>> pdep 1 1 :: Word64 1
-
No documentation available.
-
bits-extra Data.Bits.Pext Parallel extract bits for Word64 Copies selected bits from src to contiguous low-order bits of the return value; higher-order return value bits are cleared.
>>> pext 1 1 :: Word64 1
-
blank-canvas Graphics.Blank A value representing a percentage (e.g., 0.0 represents 0%, 100.0 represents 100%, etc.).
-
blank-canvas Graphics.Blank.Cursor No documentation available.