The language in the function editor on the right looks like Haskell. I'm confused as to what the language you run is supposed to be, though. It doesn't seem to have Haskell syntax or semantics. The lists aren't comma-separated, and the main expression seems to require parenthesis? And what is this program doing?
(map (plus 1) )
(( 1) : (map (plus 1) ))
(( 1) : (( 2) : (map (plus 1) )))
(( 1) : (( 2) : ))
(( 1) : [( 2)])
[( 1)( 2)]
Prelude> map (+ 1) [1, 2]
In any case, the parser can be found here, https://github.com/stevekrouse/hs.js/blob/812945939e14e3370f..., the transformations on the AST here, https://github.com/stevekrouse/hs.js/blob/812945939e14e3370f..., and the specs here, https://github.com/stevekrouse/hs.js/blob/812945939e14e3370f....
A couple of points:
- If there is a syntax error, the box just turns red. It would be nice to see what the issue is.
- You could probably make it clearer that it's possible to execute arbitrary expressions, by editing the map term, for example.
The (edit) and (clear) links are now always visible to encourage editing, per https://github.com/stevekrouse/hs.js/commit/e301961c03d92c58...
1. Clear does not work. Firefox 22.0, private mode.
2. Clicking to expand gets tedious fast. Adding shortcut like space would be nice.
3. No syntax highlighting on function editor, also lists could use some colors.
2. But what should we expand then? Just the first one? Part what makes it interesting is that you can decide for yourself what to expand, and it doesn't matter in which order you do it (Church-Rosser).
3. Feel free to hack CodeMirror or Ace in there! :)
5. 'Clear' clears some lines but not all. It usually seems to clear all but the top two lines for me.
Chrome v.36 in Ubuntu
This document implements a small, dyanmically-typed,
subset of Haskell that includes integers, lists, functions,
pattern matching and recursion.