exchangealgebra 0.6.0.0 → 0.6.0.1
raw patch · 8 files changed
+39/−14 lines, 8 filesdep ~base
Dependency ranges changed: base
Files
- ChangeLog.md +15/−0
- README.md +1/−1
- exchangealgebra.cabal +4/−4
- src/ExchangeAlgebra/Accounting/Transfer.hs +1/−1
- src/ExchangeAlgebra/Simulation/Network/Flows.hs +1/−1
- src/ExchangeAlgebra/Simulation/Network/Representation.hs +1/−1
- test/Transfer/BalanceSpec.hs +1/−1
- tools/check-export-surface.py +15/−5
ChangeLog.md view
@@ -1,5 +1,20 @@ # Changelog for ExchangeAlgebra +## 0.6.0.1 - 2026-11-09++### Fixed++- The library builds with GHC 9.8 (`base` 4.19). Version 0.6.0.0 used+ `foldl'` without importing it, which compiles only where the Prelude+ exports `foldl'` (`base` 4.20, GHC 9.10). Hackage's documentation builder+ uses GHC 9.8, so 0.6.0.0 has no documentation on Hackage.+- The lower bound on `base` is `>= 4.19` (GHC 9.8), the oldest version tested.+ 0.6.0.0 declared `>= 4.17`, which was never tested; a Hackage metadata+ revision raised the 0.6.0.0 bound to `>= 4.20`.++No API or numeric results change. The upper bound on `random` stays `< 1.3`:+with `random` 1.3 the same seed yields different simulation numbers.+ ## 0.6.0.0 - 2026-11-06 ### Highlights
README.md view
@@ -40,7 +40,7 @@ ``` Requirements:-- GHC 9.10 (tested with Stackage `lts-24.4`)+- GHC 9.8 or 9.10 (tested with Stackage `lts-23.28` and `lts-24.65`) - Cabal 3.0 or later - The plotting module `ExchangeAlgebra.Simulate.Visualize` is off by default. To use it, install the Cairo / Pango / Freetype system libraries (on macOS:
exchangealgebra.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: exchangealgebra-version: 0.6.0.0+version: 0.6.0.1 synopsis: Exchange Algebra for bookkeeping and economic simulation description: Exchange Algebra is an algebraic description of bookkeeping developed by Hiroshi Deguchi. This package represents bookkeeping entries as elements of a redundant algebra, where increases and decreases are expressed by Hat and Not bases rather than by sign. It provides journals with notes, accounting operations such as closing, transfers, trial balances, and financial statements, CSV input and output, and a state-space framework for economic simulation. See the README for a guide and the changelog for migration notes. category: Accounting, Finance, Math@@ -273,7 +273,7 @@ Decimal ==0.5.* , array >=0.5.5 && <0.6 , async ==2.2.*- , base >=4.17 && <5+ , base >=4.19 && <5 , binary ==0.8.* , bytestring >=0.11 && <0.13 , containers >=0.6 && <0.8@@ -307,7 +307,7 @@ Decimal ==0.5.* , array >=0.5.5 && <0.6 , async ==2.2.*- , base >=4.17 && <5+ , base >=4.19 && <5 , binary ==0.8.* , bytestring >=0.11 && <0.13 , containers >=0.6 && <0.8@@ -410,7 +410,7 @@ , QuickCheck >=2.14 && <3 , array >=0.5.5 && <0.6 , async ==2.2.*- , base >=4.17 && <5+ , base >=4.19 && <5 , binary ==0.8.* , bytestring >=0.11 && <0.13 , containers >=0.6 && <0.8
src/ExchangeAlgebra/Accounting/Transfer.hs view
@@ -178,7 +178,7 @@ , transferEntriesByWith ) where -import Data.List (find, inits)+import Data.List (find, foldl', inits) import qualified Data.Map.Strict as Map import qualified Data.Set as Set import qualified Data.HashMap.Strict as HashMap
src/ExchangeAlgebra/Simulation/Network/Flows.hs view
@@ -12,7 +12,7 @@ , defaultFlowOptions, industrialFlows, industrialFlowsWith ) where import Control.DeepSeq (NFData (..))-import Data.List (sortBy)+import Data.List (foldl', sortBy) import qualified Data.Map.Strict as M import Data.Map.Strict (Map) import qualified Data.Set as S
src/ExchangeAlgebra/Simulation/Network/Representation.hs view
@@ -10,7 +10,7 @@ module ExchangeAlgebra.Simulation.Network.Representation where import Control.DeepSeq (NFData (..))-import Data.List (sortBy)+import Data.List (foldl', sortBy) import qualified Data.Map.Strict as M import Data.Map.Strict (Map) import Data.Maybe (fromMaybe)
test/Transfer/BalanceSpec.hs view
@@ -8,7 +8,7 @@ import ExchangeAlgebra.Accounting.Account import ExchangeAlgebra.Accounting.Exchange import Control.Monad (forM_, unless)-import Data.List (sort)+import Data.List (foldl', sort) import qualified Data.HashMap.Strict as HashMap import qualified Data.Map.Strict as Map import Data.Maybe (isJust)
tools/check-export-surface.py view
@@ -33,14 +33,20 @@ return modules +COMPILER_VERSION = None++ def interface_path(module):+ # A checkout keeps one dist directory per platform and GHC that built it+ # (stack.yaml and stack-ghc98.yaml share .stack-work). `ghc --show-iface`+ # reads only interfaces of its own version, so take the directory of the+ # compiler in use; before it is known, take the newest interface.+ version_glob = f"ghc-{COMPILER_VERSION}" if COMPILER_VERSION else "ghc-*" matches = list((ROOT / ".stack-work/dist").glob(- f"*/ghc-*/build/{module.replace('.', '/')}.hi"+ f"*/{version_glob}/build/{module.replace('.', '/')}.hi" )) if not matches:- raise RuntimeError(f"Expected an interface for {module}, found none")- # An old checkout keeps one dist directory per platform and GHC that built- # it. The interface of the build that just ran is the newest one.+ raise RuntimeError(f"Expected an interface for {module} built by {version_glob}, found none") return max(matches, key=lambda path: path.stat().st_mtime) @@ -112,11 +118,15 @@ "path", "--compiler-exe"], check=True, capture_output=True, text=True, ).stdout.strip()+ global COMPILER_VERSION+ COMPILER_VERSION = subprocess.run(+ [COMPILER, "--numeric-version"], check=True, capture_output=True, text=True,+ ).stdout.strip() exposed = set(exposed_modules()) visual_disabled = os.environ.get("EA_VISUALIZE", "1") == "0" if args.suite and "ExchangeAlgebra.Simulate.Visualize" in exposed: visual_iface = list((ROOT / ".stack-work/dist").glob(- "*/ghc-*/build/ExchangeAlgebra/Simulate/Visualize.hi"))+ f"*/ghc-{COMPILER_VERSION}/build/ExchangeAlgebra/Simulate/Visualize.hi")) if not visual_iface: exposed.remove("ExchangeAlgebra.Simulate.Visualize") visual_disabled = True