simple-expr

Minimalistic toolkit for simple mathematical expression.

LTS Haskell 24.20:0.1.1.0
Stackage Nightly 2025-11-21:0.2.0.0
Latest on Hackage:0.2.0.0

See all snapshots simple-expr appears in

BSD-3-Clause licensed by Alexey Tochin
Maintained by [email protected]
This version can be pinned in stack with:simple-expr-0.2.0.0@sha256:a12456c55c30f26dbdf1cbca807351dd7f9d65b6bcca43c117953268c457a655,3467

Module documentation for 0.2.0.0

This is a minimalistic toolkit for simple mathematical expression developed for debug purposes similar to simple-reflect package but based on slightly different principles. In particular, we use ordinary syntactic trees instead of turning them into strings.

There is a primitive manipulation capability like

>>> simplify $ (x + 0) * 1 - x * (3 - 2)
0

Besides an expression visualization feature is also provided.

See tutorial for details.

Changes

Revision history for simple-expr

[0.2.0.0] – 2025-11-13

Changed

  • Compatibility with inf-backprop 0.2.0.0
  • Removed BinaryFuncF
  • Switched form String to Text
  • Instances of FromIntegral for SimpleExpr type.

[0.1.1.0] – 2023-08-05

Fixed

  • Compatibility up to LTS 21.6

[0.1.0.0] – 2023-05-12

Added

  • Basic types SimpleExpr, Expr and instances for NumHask typeclasses.
  • Conversion to graphs from graphite package.
  • Visualization provided by graphviz.
  • Tutorial