Clicky Evaluation parses simple Haskell-like expressions and function definitions and renders them as HTML. The user can then choose which subexpressions to evaluate for one step by clicking on them. This is intended as a simple learning tool for beginners, which shows them how their Haskell code might be evaluated.
You can try it here.
The projects name is a play on lazy evaluation and clicking to evaluate an expression.
[(+), (-), (*), ('div'), ('mod'), (^)]
[(==), (/=), (<=), (<), (>), (>=)]
[(&&), (||), (not)]
[($), (.), (:), (++)]
a + b <=> (+) a b
(^2) 4 => 4^2 => 16
head, map, foldr, scanr, filter, all, ...
case
, where
, let
Install npm
and purescript
(at least 0.8.0).
You can get purescript
via cabal install purescript
or npm install purescript
.
Then run:
npm install
npm run build
For the unit tests you can also run:
npm run test
After a successful build use:
<your_browser> html/index.html
You can build and host a specific version of ClickyEvaluation yourself by providing the following files on your webserver:
npm run test
or pulp build --to Main.js
)Or you can link to the most recent version here.