s-cargot-letbind 0.2.2.0 → 0.2.3.0
raw patch · 3 files changed
+26/−25 lines, 3 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- ChangeLog.md +20/−14
- s-cargot-letbind.cabal +3/−3
- src/Data/SCargot/LetBind.hs +3/−8
ChangeLog.md view
@@ -1,29 +1,35 @@ # Revision history for s-cargot-letbind +## 0.2.3.0 -- 2018-06-12++ * Relax upper bound to allow build with GHC 8.4++ * Haddock documentation fix for special characters.+ ## 0.2.2.0 -- 2018-03-02 - * Updated to use s-cargot release 0.1.4.0.+ * 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).+ 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- `unconstrainedPrint` added in that version for increased- performance.+ * Updated to use s-cargot release 0.1.3.0 and the+ `unconstrainedPrint` added in that version for increased+ performance. ## 0.2.0.0 -- 2018-02-16 * Added verification ability to ensure let-bind variables are- always unique with respect to each-other and with respect to all- generated symbol strings within the s-expression. This is- performed internally within the 'discoverLetBindings' function,- but requires the ability to get the string representation of an- S-expression atom, so the 'extractStr' function is added to the- 'DiscoveryGuide' to support this. If not provided, or if the- provided form returns Nothing, no validation will be performed.+ always unique with respect to each-other and with respect to all+ generated symbol strings within the s-expression. This is+ performed internally within the 'discoverLetBindings' function,+ but requires the ability to get the string representation of an+ S-expression atom, so the 'extractStr' function is added to the+ 'DiscoveryGuide' to support this. If not provided, or if the+ provided form returns Nothing, no validation will be performed. * Suppress generation of let-binding phrase if there are no discovered bindings to apply.
s-cargot-letbind.cabal view
@@ -1,5 +1,5 @@ name: s-cargot-letbind-version: 0.2.2.0+version: 0.2.3.0 synopsis: Enables let-binding and let-expansion for s-cargot defined S-expressions. description: @@ -46,7 +46,7 @@ library exposed-modules: Data.SCargot.LetBind- build-depends: base >=4.10 && <4.11+ build-depends: base >=4.9 && <5 , s-cargot >= 0.1.4.0 && <0.2 , text >=1.2 && <2 hs-source-dirs: src@@ -58,7 +58,7 @@ type: exitcode-stdio-1.0 hs-source-dirs: test main-is: SCargotPrintParseLet.hs- build-depends: base >=4.7 && <5+ build-depends: base >=4.9 && <5 , parsec >=3.1 && <4 , HUnit >=1.6 && <1.7 , s-cargot >= 0.1.4.0 && <0.2
src/Data/SCargot/LetBind.hs view
@@ -172,16 +172,15 @@ weights to various S-expression phrases: the S-expressions with the highest weights will be let-bound to variables (up to the 'maxLetBinds' limit). A weighting value of 0 will cause the-sub-expression to be ignored (never let-bound) and a value of >=-1000000 will *always* insert a let-binding, ignoring all other limits.+sub-expression to be ignored (never let-bound) and a value equal to or+greater than 1000000 will *always* insert a let-binding, ignoring all+other limits. -} alwaysBindWeight :: Int alwaysBindWeight = 1000000 --- KWQ: never bind top (n) bindings to avoid: (let ((var2 (...))) (var2))--- KWQ: no bindings if length of bound portion is 1 after another binding... why isn't skip reset protecting against this? bestBindings :: DiscoveryGuide a str -> ExprInfo a -> [Location a] -> [Location a] bestBindings guide exprs locs = getMaxBest where getMaxBest = head $@@ -413,7 +412,3 @@ Nothing -> SCons (expandWith vdefs l) (expandWith vdefs r) Just vv -> expandWith vdefs vv expandWith _ e@(SAtom _) = e---- KWQ1: change--- KWQ1: change 2--- KWQ1: change 5