packages feed

proto-lens 0.5.0.0 → 0.5.0.1

raw patch · 3 files changed

+19/−14 lines, 3 filesdep ~primitivedep ~profunctorsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: primitive, profunctors

API changes (from Hackage documentation)

Files

Changelog.md view
@@ -1,6 +1,10 @@ # Changelog for `proto-lens` -## v0.5.0.0+## v0.5.0.1+- Bump the upper bound on `profunctors` to allow 5.4.+- Bump the upper bound on `primitive` to allow 0.7.+- Allow text format protobuf strings to contain unescaped quote characters+  different from the delimiters (#320).  ### Breaking Changes - Merge the `lens-labels` library into `proto-lens`:
proto-lens.cabal view
@@ -1,13 +1,11 @@-cabal-version: 1.12---- This file has been generated from package.yaml by hpack version 0.31.1.+-- This file has been generated from package.yaml by hpack version 0.28.2. -- -- see: https://github.com/sol/hpack ----- hash: b65e668c793e451c25341ac7d0d137ca534c8388cc6417c3119fc6cb5122e638+-- hash: 29ea431ef6a13fa63ce37199c52c0b46df4db87cdfa86c0241034a9d9c5aaa12  name:           proto-lens-version:        0.5.0.0+version:        0.5.0.1 synopsis:       A lens-based implementation of protocol buffers in Haskell. description:    The proto-lens library provides an API for protocol buffers using modern Haskell language and library patterns.  Specifically, it provides:                 .@@ -25,11 +23,12 @@ license:        BSD3 license-file:   LICENSE build-type:     Simple+cabal-version:  >= 1.10 extra-source-files:     Changelog.md data-files:-    proto-lens-imports/google/protobuf/descriptor.proto     proto-lens-imports/google/protobuf/compiler/plugin.proto+    proto-lens-imports/google/protobuf/descriptor.proto  source-repository head   type: git@@ -72,8 +71,8 @@     , lens-family ==1.2.*     , parsec ==3.1.*     , pretty ==1.1.*-    , primitive ==0.6.*-    , profunctors >=5.2 && <5.4+    , primitive >=0.6 && <0.8+    , profunctors >=5.2 && <5.5     , tagged ==0.8.*     , text ==1.2.*     , transformers >=0.4 && <0.6
src/Data/ProtoLens/TextFormat/Parser.hs view
@@ -6,6 +6,8 @@  -- | Helper utilities to parse the human-readable text format into a -- proto-agnostic syntax tree.+{-# LANGUAGE FlexibleContexts #-}+ module Data.ProtoLens.TextFormat.Parser     ( Message     , Field(..)@@ -129,14 +131,14 @@ protoStringLiteral :: Parser ByteString protoStringLiteral = do     initialQuoteChar <- char '\'' <|> char '\"'-    word8s <- many stringChar+    word8s <- many $ stringChar initialQuoteChar     _ <- char initialQuoteChar     return $ pack word8s   where-    stringChar :: Parser Word8-    stringChar = nonEscape <|> stringEscape-    nonEscape  = fmap (fromIntegral . ord)-        $ satisfy (\c -> c `notElem` "\\\'\"" && ord c < 256)+    stringChar :: Char -> Parser Word8+    stringChar quote = (nonEscape quote) <|> stringEscape+    nonEscape quote = fmap (fromIntegral . ord)+        $ satisfy (\c -> c `notElem` "\\" ++ [quote] && ord c < 256)     stringEscape = char '\\' >> (octal <|> hex <|> unicode <|> simple)     octal = do d0 <- octDigit                d1 <- optionMaybe octDigit