b9 0.5.31 → 0.5.32
raw patch · 4 files changed
+41/−29 lines, 4 filesdep ~QuickCheckdep ~aesondep ~asyncPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: QuickCheck, aeson, async, b9, bifunctors, conduit, conduit-extra, directory, filepath, hashable, hspec, hspec-expectations, optparse-applicative, parallel, pretty-show, process, unordered-containers, yaml
API changes (from Hackage documentation)
Files
- b9.cabal +24/−24
- src/lib/B9/Content/ErlTerms.hs +8/−4
- src/tests/B9/Content/ErlTermsSpec.hs +8/−0
- stack.yaml +1/−1
b9.cabal view
@@ -1,5 +1,5 @@ name: b9-version: 0.5.31+version: 0.5.32 cabal-version: >=1.22 build-type: Simple license: MIT@@ -88,33 +88,33 @@ build-depends: ConfigFile >=1.1.4, QuickCheck >=2.5,- aeson >=0.11.2.1,- async >=2.1.0,+ aeson >=1.0.2.1,+ async >=2.1.1.1, base >=4.8 && <5, binary >=0.8.3.0, bytestring >=0.10.8.1,- conduit >=1.2.8,- conduit-extra >=1.1.15,- directory >=1.2.6.2,- filepath >=1.4.1.0,- hashable >=1.2.4.0,+ conduit >=1.2.11,+ conduit-extra >=1.1.16,+ directory >=1.3.0.0,+ filepath >=1.4.1.1,+ hashable >=1.2.6.1, mtl >=2.2.1, time >=1.6.0.1,- parallel >=3.2.1.0,+ parallel >=3.2.1.1, parsec >=3.1.11,- pretty-show >=1.6.12,+ pretty-show >=1.6.13, pretty >=1.1.3.3,- process >=1.4.2.0,+ process >=1.4.3.0, random >=1.1, semigroups >=0.18.2, syb >=0.6, template >=0.2.0.10, text >=1.2.2.1, transformers >=0.5.2.0,- unordered-containers >=0.2.7.1,+ unordered-containers >=0.2.8.0, vector >=0.11.0.0,- yaml >=0.8.20,- bifunctors >=5.4.1,+ yaml >=0.8.23.1,+ bifunctors >=5.4.2, free >=4.12.4, boxes >=0.1.4 default-language: Haskell2010@@ -133,11 +133,11 @@ ghc-options: -fno-warn-amp main-is: Main.hs build-depends:- b9 >=0.5.31,+ b9 >=0.5.32, base >=4.8 && <5,- directory >=1.2.6.2,+ directory >=1.3.0.0, bytestring >=0.10.8.1,- optparse-applicative >=0.12.1.0+ optparse-applicative >=0.13.2.0 default-language: Haskell2010 default-extensions: TupleSections GeneralizedNewtypeDeriving DeriveDataTypeable RankNTypes FlexibleContexts GADTs DataKinds@@ -153,14 +153,14 @@ main-is: Spec.hs build-depends: base >=4.8 && <5,- b9 >=0.5.31,- hspec >=2.2.4,- hspec-expectations >=0.7.2,- QuickCheck >=2.8.2,- aeson >=0.11.2.1,- yaml >=0.8.20,+ b9 >=0.5.32,+ hspec >=2.4.3,+ hspec-expectations >=0.8.2,+ QuickCheck >=2.5,+ aeson >=1.0.2.1,+ yaml >=0.8.23.1, vector >=0.11.0.0,- unordered-containers >=0.2.7.1,+ unordered-containers >=0.2.8.0, bytestring >=0.10.8.1, text >=1.2.2.1, semigroups >=0.18.2
src/lib/B9/Content/ErlTerms.hs view
@@ -67,10 +67,14 @@ prettyPrintErlTerm (ErlAtom a) = PP.text quotedAtom where quotedAtom =- if all (`elem` (['a'..'z']++['A'..'Z']++['0'..'9']++"@_")) a'- then a'- else "'"++a'++"'"- a' = toErlAtomString a+ case toErlAtomString a of+ "" -> "''"+ a'@(firstChar:rest)+ | firstChar `elem` ['a' .. 'z'] &&+ all (`elem` atomCharsThatDontNeedQuoting) rest -> a'+ a' -> "'" ++ a' ++ "'"+ atomCharsThatDontNeedQuoting =+ ['a' .. 'z'] ++ ['A' .. 'Z'] ++ ['0' .. '9'] ++ "@_" prettyPrintErlTerm (ErlBinary []) = PP.text "<<>>" prettyPrintErlTerm (ErlBinary b) = PP.text ("<<\"" ++ toErlStringString b ++ "\">>")
src/tests/B9/Content/ErlTermsSpec.hs view
@@ -122,6 +122,14 @@ (renderErlTerm (ErlAtom " $s\"<\\.0_=@\ESC'") `shouldBe` "' $s\"<\\\\.0_=@\\x{1b}\\''.") + it "renders _ correctly as '_'"+ (renderErlTerm (ErlAtom "_")+ `shouldBe` "'_'.")++ it "renders an empty string correctly as ''"+ (renderErlTerm (ErlAtom "")+ `shouldBe` "''.")+ it "renders a string and escapes special characters" (renderErlTerm (ErlString "' $s\"<\\.0_=@\ESC''") `shouldBe` "\"' $s\\\"<\\\\.0_=@\\x{1b}''\".")
stack.yaml view
@@ -2,5 +2,5 @@ packages: - '.' extra-deps: []-resolver: lts-7.9+resolver: lts-8.22 pvp-bounds: lower