imp-ppl 0.1.0.0 → 0.1.0.1
raw patch · 7 files changed
+25/−10 lines, 7 filesdep ~basedep ~timePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, time
API changes (from Hackage documentation)
Files
- CHANGELOG.md +7/−0
- imp-ppl.cabal +8/−5
- src/Imp/Inference/Enumerate.hs +2/−1
- src/Imp/Inference/Symbolic.hs +2/−1
- src/Imp/Semiring.hs +2/−1
- viz/Viz.hs +2/−1
- viz/Viz/ConvexHull.hs +2/−1
CHANGELOG.md view
@@ -1,5 +1,12 @@ # Revision history for imp-ppl +## 0.1.0.1 — 2026-08-07++* Lower the `base` bound to 4.18, supporting GHC 9.6 onwards.+* Relax the benchmark `time` bound to allow 1.15.++No functional changes.+ ## 0.1.0.0 — 2026-08-06 * First release: the graded monad DSL, BDD compilation, and four credal
imp-ppl.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: imp-ppl-version: 0.1.0.0+version: 0.1.0.1 synopsis: Imprecise probabilistic programming via BDDs description: A DSL for discrete probabilistic programs with Knightian uncertainty,@@ -17,7 +17,10 @@ homepage: https://github.com/jacklc3/imp bug-reports: https://github.com/jacklc3/imp/issues build-type: Simple-tested-with: GHC == 9.10.1+tested-with: GHC == 9.6.7+ , GHC == 9.8.4+ , GHC == 9.10.1+ , GHC == 9.12.1 , GHC == 9.14.1 extra-doc-files:@@ -31,7 +34,7 @@ source-repository this type: git location: https://github.com/jacklc3/imp.git- tag: v0.1.0.0+ tag: v0.1.0.1 -- Development-only visualisation and benchmark executables. flag dev@@ -66,7 +69,7 @@ Imp.Examples.Polytope Imp.Examples.TwoChild build-depends:- base >= 4.20 && < 5,+ base >= 4.18 && < 5, containers >= 0.6 && < 0.9, mtl >= 2.3 && < 2.4, vector >= 0.13 && < 0.14@@ -102,7 +105,7 @@ build-depends: base, imp-ppl,- time >= 1.12 && < 1.15+ time >= 1.12 && < 1.16 default-language: GHC2021 default-extensions: DataKinds
src/Imp/Inference/Enumerate.hs view
@@ -14,6 +14,7 @@ import Control.Monad.State.Strict (runState) import Data.Bool (bool) import Data.Functor.Compose (Compose(..))+import qualified Data.List as L import Data.Maybe (mapMaybe) import qualified Data.IntMap.Strict as IntMap import Data.Map.Strict (Map)@@ -35,7 +36,7 @@ -- | Compute the min and max of a non-empty list in a single strict pass. bounds :: Ord a => [a] -> (a, a) bounds [] = error "No feasible probabilities"-bounds (x:xs) = foldl' step (x, x) xs+bounds (x:xs) = L.foldl' step (x, x) xs where step (!mn, !mx) y = (min mn y, max mx y) -- | Precise marginal distribution. Only for programs with no Knightian choices.
src/Imp/Inference/Symbolic.hs view
@@ -11,6 +11,7 @@ import Data.Bits (bit, testBit, clearBit, (.|.)) import Data.Bool (bool)+import qualified Data.List as L import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map @@ -59,7 +60,7 @@ -- | Bounds over the feasible corners of the parameter box. optimizeRatio :: PolyS -> PolyS -> (Double, Double) optimizeRatio den num =- let mask = foldl' (.|.) 0 (Map.keys (unPoly num) ++ Map.keys (unPoly den))+ let mask = L.foldl' (.|.) 0 (Map.keys (unPoly num) ++ Map.keys (unPoly den)) free = [ i | i <- takeWhile (\i -> bit (2 * i) <= mask) [0 ..] , testBit mask (2 * i) || testBit mask (2 * i + 1) ] in case cornerRatios free den num of
src/Imp/Semiring.hs view
@@ -9,6 +9,7 @@ ) where import Data.Bits ((.|.))+import qualified Data.List as L import qualified Data.Map.Strict as Map import qualified Data.Vector as V @@ -24,7 +25,7 @@ -- | Sum a list in the semiring. sumS :: Semiring s => [s] -> s-sumS = foldl' (.+.) zero+sumS = L.foldl' (.+.) zero -- | Probability semiring for precise WMC. newtype ProbS = ProbS { unProb :: Double }
viz/Viz.hs view
@@ -11,6 +11,7 @@ ) where import Data.List (sort)+import qualified Data.List as L import qualified Data.IntMap.Strict as IntMap import qualified Data.Map.Strict as Map import qualified Data.Set as Set@@ -355,7 +356,7 @@ -- | All internal node ids reachable from the given roots, each visited once. collectNids :: BDDManager -> [BDD] -> [NodeId]-collectNids mgr = Set.toList . foldl' go Set.empty+collectNids mgr = Set.toList . L.foldl' go Set.empty where go seen BDDTrue = seen go seen BDDFalse = seen
viz/Viz/ConvexHull.hs view
@@ -4,6 +4,7 @@ ) where import Data.List (sort, nubBy)+import qualified Data.List as L -- | Compute the convex hull of a set of 2D points. -- Returns the hull vertices in counterclockwise order.@@ -18,7 +19,7 @@ in init lower ++ init upper where unique = dedup2D pts- buildHull = foldl' add []+ buildHull = L.foldl' add [] add stack p = p : dropRightTurns stack where dropRightTurns (b : a : rest)