packages feed

hasmtlib 2.8.0 → 2.8.1

raw patch · 3 files changed

+37/−4 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Language.Hasmtlib.Type.Debugger: instance Data.Functor.Contravariant.Contravariant Language.Hasmtlib.Type.Debugger.Debugger
+ Language.Hasmtlib.Type.Debugger: instance GHC.Base.Monoid (Language.Hasmtlib.Type.Debugger.Debugger s)
+ Language.Hasmtlib.Type.Debugger: instance GHC.Base.Semigroup (Language.Hasmtlib.Type.Debugger.Debugger s)
- Language.Hasmtlib.Type.Solver: mDebugger :: forall s_a23Gf s_a23Hc. Lens (SolverConfig s_a23Gf) (SolverConfig s_a23Hc) (Maybe (Debugger s_a23Gf)) (Maybe (Debugger s_a23Hc))
+ Language.Hasmtlib.Type.Solver: mDebugger :: forall s_a24xQ s_a24yN. Lens (SolverConfig s_a24xQ) (SolverConfig s_a24yN) (Maybe (Debugger s_a24xQ)) (Maybe (Debugger s_a24yN))
- Language.Hasmtlib.Type.Solver: mTimeout :: forall s_a23Gf. Lens' (SolverConfig s_a23Gf) (Maybe Int)
+ Language.Hasmtlib.Type.Solver: mTimeout :: forall s_a24xQ. Lens' (SolverConfig s_a24xQ) (Maybe Int)
- Language.Hasmtlib.Type.Solver: processConfig :: forall s_a23Gf. Lens' (SolverConfig s_a23Gf) Config
+ Language.Hasmtlib.Type.Solver: processConfig :: forall s_a24xQ. Lens' (SolverConfig s_a24xQ) Config

Files

CHANGELOG.md view
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [PVP versioning](https://pvp.haskell.org/). +## v2.8.1 _(2024-11-29)_++### Added+- Added instances `Semigroup`, `Monoid` and `Contravariant` for `Debugger`+ ## v2.8.0 _(2024-11-28)_  ### Changed
hasmtlib.cabal view
@@ -1,7 +1,7 @@ cabal-version:         3.0  name:                  hasmtlib-version:               2.8.0+version:               2.8.1 synopsis:              A monad for interfacing with external SMT solvers description:           Hasmtlib is a library for generating SMTLib2-problems using a monad.   It takes care of encoding your problem, marshaling the data to an external solver and parsing and interpreting the result into Haskell types.@@ -21,6 +21,7 @@ tested-with:           GHC == 9.4.8                      , GHC == 9.6.4                      , GHC == 9.8.2+                     , GHC == 9.10.1  library   hs-source-dirs:      src@@ -60,8 +61,8 @@   build-depends:       array                        >= 0.5    && < 1                      , attoparsec                   >= 0.14.4 && < 1                      , base                         >= 4.17.2 && < 5-                     , lifted-base                  >= 0.2 && < 0.5-                     , monad-control                >= 1.0 && < 1.2+                     , lifted-base                  >= 0.2    && < 0.5+                     , monad-control                >= 1.0    && < 1.2                      , bytestring                   >= 0.11.5 && < 1                      , containers                   >= 0.6.7  && < 1                      , unordered-containers         >= 0.2.20 && < 0.3
src/Language/Hasmtlib/Type/Debugger.hs view
@@ -19,7 +19,6 @@   , assertionish   , incrementalStackish, getValueish   , responseish-   ) where @@ -34,6 +33,7 @@ import Data.ByteString.Builder import qualified Data.ByteString.Lazy.Char8 as ByteString.Char8 import Data.Default+import Data.Functor.Contravariant import Control.Lens hiding (op)  -- | A type holding actions for debugging states holding SMT-Problems.@@ -57,6 +57,33 @@  instance Default (Debugger s) where   def = verbosely++-- | Concats actions+instance Semigroup (Debugger s) where+  x <> y = Debugger+    (\input -> debugState x input          >> debugState y input)+    (\input -> debugOption x input         >> debugOption y input)+    (\input -> debugLogic x input          >> debugLogic y input)+    (\input -> debugVar x input            >> debugVar y input)+    (\input -> debugAssert x input         >> debugAssert y input)+    (\input -> debugPop x input            >> debugPop y input)+    (\input -> debugCheckSat x input       >> debugCheckSat y input)+    (\input -> debugGetModel x input       >> debugGetModel y input)+    (\input -> debugGetValue x input       >> debugGetValue y input)+    (\input -> debugMinimize x input       >> debugMinimize y input)+    (\input -> debugMaximize x input       >> debugMaximize y input)+    (\input -> debugMaximize x input       >> debugMaximize y input)+    (\input -> debugAssertSoft x input     >> debugAssertSoft y input)+    (\input -> debugResultResponse x input >> debugResultResponse y input)+    (\input -> debugModelResponse x input  >> debugModelResponse y input)++instance Monoid (Debugger s) where+  mempty = silently++instance Contravariant Debugger where+  contramap f' debugger = debugger { debugState = f . f' }+    where+      f = debugState debugger  printer :: Builder -> IO () printer = ByteString.Char8.putStrLn . toLazyByteString