packages feed

pandoc-symreg 0.2.0.0 → 0.2.1.0

raw patch · 4 files changed

+11/−10 lines, 4 filesdep +srtree-eqsatdep ~srtreePVP ok

version bump matches the API change (PVP)

Dependencies added: srtree-eqsat

Dependency ranges changed: srtree

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -8,14 +8,13 @@  ## Unreleased -- Simplification with Equality Saturation - Added CI tests -## 0.2.1.0 - 2023-04-30+## 0.2.1.0 - 2023-05-20  - Changed to srtree-1.0.0.1 - Fixed not parsing white spaces between operators-- Simplification disabled for now+- Simplification with Equality Saturation  ## 0.1.1.0 - 2023-02-13 
pandoc-symreg.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           pandoc-symreg-version:        0.2.0.0+version:        0.2.1.0 synopsis:       A tool to convert symbolic regression expressions into different formats. description:    A pandoc-like cli tool and library to convert symbolic regression expressions to convenient formats category:       Text, Math@@ -41,7 +41,8 @@     , bytestring ==0.11.*     , mtl ==2.2.*     , optparse-applicative ==0.17.*-    , srtree >=1.0.0.1 && <1.1+    , srtree >=1.0.0.2 && <1.1+    , srtree-eqsat   default-language: Haskell2010  executable pandoc-symreg@@ -59,7 +60,8 @@     , mtl ==2.2.*     , optparse-applicative ==0.17.*     , pandoc-symreg-    , srtree >=1.0.0.1 && <1.1+    , srtree >=1.0.0.2 && <1.1+    , srtree-eqsat   default-language: Haskell2010  test-suite pandoc-symreg-test@@ -78,5 +80,6 @@     , mtl ==2.2.*     , optparse-applicative ==0.17.*     , pandoc-symreg-    , srtree >=1.0.0.1 && <1.1+    , srtree >=1.0.0.2 && <1.1+    , srtree-eqsat   default-language: Haskell2010
src/Text/ParseSR.hs view
@@ -11,7 +11,6 @@  import Debug.Trace ( trace ) import Data.SRTree-import Data.SRTree.Recursion (Fix(..))  -- * Data types 
src/Text/ParseSR/IO.hs view
@@ -7,6 +7,7 @@ import qualified Data.ByteString.Char8 as B import Data.SRTree import Data.SRTree.Recursion (Fix(..))+import Data.SRTree.EqSat import Text.ParseSR ( SRAlgs, Output, parseSR, showOutput )  withInput :: String -> SRAlgs -> String -> Bool -> Bool -> IO [Either String (Fix SRTree)]@@ -14,11 +15,10 @@   h <- if null fname then pure stdin else openFile fname ReadMode   contents <- hGetLines h    let myParserFun = parseSR sr (B.pack hd) param . B.pack-      myParser = if simpl then fmap simplify . myParserFun else myParserFun+      myParser = if simpl then fmap simplifyEqSat . myParserFun else myParserFun       es = map myParser $ filter (not . null) contents   unless (null fname) $ hClose h   pure es-  where simplify = id  withOutput :: String -> Output -> [Either String (Fix SRTree)] -> IO () withOutput fname output exprs = do