s-cargot-letbind 0.2.1.0 → 0.2.2.0
raw patch · 3 files changed
+28/−8 lines, 3 filesdep ~s-cargotPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: s-cargot
API changes (from Hackage documentation)
Files
- ChangeLog.md +9/−1
- s-cargot-letbind.cabal +3/−3
- test/SCargotPrintParseLet.hs +16/−4
ChangeLog.md view
@@ -1,9 +1,17 @@ # Revision history for s-cargot-letbind +## 0.2.2.0 -- 2018-03-02++ * Updated to use s-cargot release 0.1.4.0.++ More performance fixes in s-cargot for `basicPrint`, and using+ `unconstrainedPrint` without a width specification (because a+ width specification devolves into `basicPrint` anyhow).+ ## 0.2.1.0 -- 2018-03-02 * Updated to use s-cargot release 0.1.3.0 and the- `unconstrainedOutput` added in that version for increased+ `unconstrainedPrint` added in that version for increased performance. ## 0.2.0.0 -- 2018-02-16
s-cargot-letbind.cabal view
@@ -1,5 +1,5 @@ name: s-cargot-letbind-version: 0.2.1.0+version: 0.2.2.0 synopsis: Enables let-binding and let-expansion for s-cargot defined S-expressions. description: @@ -47,7 +47,7 @@ library exposed-modules: Data.SCargot.LetBind build-depends: base >=4.10 && <4.11- , s-cargot >= 0.1.3.0 && <0.2+ , s-cargot >= 0.1.4.0 && <0.2 , text >=1.2 && <2 hs-source-dirs: src default-language: Haskell2010@@ -61,6 +61,6 @@ build-depends: base >=4.7 && <5 , parsec >=3.1 && <4 , HUnit >=1.6 && <1.7- , s-cargot >= 0.1.0.0+ , s-cargot >= 0.1.4.0 && <0.2 , s-cargot-letbind , text >=1.2 && <2
test/SCargotPrintParseLet.hs view
@@ -89,6 +89,9 @@ , TestLabel "let bind corner cases" $ let pprintIt = pprintSExpr 40 Swing+ widePrintIt = encodeOne (setIndentStrategy (const Swing) $+ setIndentAmount 1 $+ unconstrainedPrint printAtom) guide = (nativeGuide AIdent (\n _ -> AIdent n)) { extractStr = Just . T.unpack . printAtom }@@ -136,8 +139,11 @@ normalf = (SAtom (AIdent "people")) in TestList [ TestLabel "trivial let binding" $- "((hi world and\n people) hallo welt\nund\nleute)" ~=?+ "((hi world and\npeople) hallo welt\nund\nleute)" ~=? (pprintIt $ discoverLetBindings nobindGuide $ sexpr normalf)+ , TestLabel "trivial let binding (wide)" $+ "((hi world and people)\n hallo\n welt\n und\n leute)" ~=?+ (widePrintIt $ discoverLetBindings nobindGuide $ sexpr normalf) , TestLabel "duplicate names" $ TestCase (assertBool "No error on duplicate bindings" =<<@@ -154,6 +160,14 @@ \ ((hi var1) hallo people))" ~=? (pprintIt $ discoverLetBindings peoplenames $ sexpr (SAtom (AIdent "last")))+ , TestLabel "expected bindings for these tests" $+ "(let\n\+ \ ((people\n (welt und leute))\n\+ \ (var1\n (world and last)))\n\+ \ ((hi var1)\n hallo\n people))" ~=?+ (widePrintIt $ discoverLetBindings peoplenames+ $ sexpr (SAtom (AIdent "last")))+ , TestLabel "expression ident names collision above bind point" $ TestCase (assertBool "No expected error on duplicate bindings" =<< throws (pprintIt $ discoverLetBindings hinames@@ -304,9 +318,7 @@ pprintSExpr w i = encodeOne (setIndentStrategy (const i) $ setMaxWidth w $ setIndentAmount 1 $- -- basicPrint- unconstrainedPrint- printAtom)+ basicPrint printAtom) getIdent :: FAtom -> Maybe String getIdent (AIdent s) = Just s