packages feed

mathexpr 0.2.0.0 → 0.2.0.1

raw patch · 2 files changed

+3/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

mathexpr.cabal view
@@ -1,5 +1,5 @@ name:                mathexpr-version:             0.2.0.0+version:             0.2.0.1 synopsis:            Parse and evaluate math expressions with variables and functions description:         A simple tool to evaluate math expressions as strings with support for custom functions and operators homepage:            https://github.com/mdibaiee/mathexpr
src/Data/MathExpr.hs view
@@ -80,6 +80,8 @@           helper :: [String] -> [String] -> Double           -- negative numbers come in the form ["num", "-"]           helper [] [o] = read o+          helper [n, "-"] [] = negate . read $ n+          helper ["-"] [n] = negate . read $ n           helper (c:cs) os             | c == "-" && length os < 2 =                 let result :: Double = negate . read . head $ cs