webml
webml copied to clipboard
A Standard ML Compiler for the Web
Idea: separate function-like, closure and function in type. Then type driven closure conversion ```sml val f: function-like = if xx then g: function else h: closure ``` ↓ ```sml val...
define `fun assert x = _externcall("js-ffi"."assert": (bool) -> unit)(x)` and use it in tests
The parser should accept multiple files and contain filename as metadata
it should be a recursive function.
correct: `0.7` `3.32E5` `3E~7` incorrect: `23` `.3` `4.E5` `1E2.5`
`ml!(let val x = 1 in x end)` => `Expr::{ ty: (),inner: ExprKind::Let { ... }}` open problem: how to embed Rust values?
need to settle the direction of implementation. * `void *` style * template style `void *` style is flexible, but may be buggy.