calculator

A calculator repl, with variables, functions & Mathematica like dynamic plots.

https://github.com/sumitsahrawat/calculator

Version on this page:0.4.1.1
LTS Haskell 6.35:0.4.1.2
Stackage Nightly 2016-05-25:0.4.1.1
Latest on Hackage:0.4.1.2

See all snapshots calculator appears in

GPL-2.0-only licensed by Sumit Sahrawat
Maintained by [email protected]
This version can be pinned in stack with:calculator-0.4.1.1@sha256:20635777ed9c6d0b69bbcb9c35332f7ba1d3279d0ea00dab8923ccf0b78360ee,3562

Module documentation for 0.4.1.1

There are no documented modules for this package.

Calculator

A calculator repl.

Features

  • Arithmetic
  • Standard mathematical functions
  • Variable bindings
  • Function bindings
    • Single argument functions
    • Multiple argument functions
  • Plotting
    • Static plots (no animation)
    • Dynamic plots (for multiple argument functions)

Installation

Linux users

From hackage:

stack install gtk2hs-buildtools
PATH="$HOME/.local/bin:$PATH" stack install calculator

From the repo:

stack install gtk2hs-buildtools # From a directory with no stack.yaml
cd /path/to/calculator/repo
PATH="$HOME/.local/bin:$PATH" stack install

Windows users

This should work, assuming the PATH variable is set correctly:

cmd> stack install gtk2hs-buildtools
cmd> stack install calculator

Implementation

  • Written in haskell
  • Parsing done using parsec
  • Repl built using haskeline
  • Colored output using ANSI color codes

Usage

Use :? to view usage instructions.

Thanks

  • Thanks to husky for color output.