百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
W

webml

> 编程语言
开源

一个适用于 Web 的标准 ML 编译器

387 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

一个适用于 Web 的标准 ML 编译器

WebML -- A Standard ML compiler for the Web

WebML is to be a Standard ML (SML '97) Compiler that works on web browsers and generates WebAssembly binaries. WebAssembly binaries can be run on web browsers. This means you can run SML REPL on web browsers.

Status

Under very early stage of initial development. Compiles only minimal subset of SML codes. The garbage collector is not complete.

Links

  • Try Online-compiler
  • Project is hosted at GitHub

Implemented features

Core

  • Declaration
    • val
      • basic (val ident = expr)
      • pattern (val pat = expr)
      • tyvar val 'a pat = expr
      • typed (val pat : ty = expr)
      • and (val pat = expr and pat = expr)
    • fun
      • basic (fun ident ident ... = expr)
      • pattern (fun ident pat ... = expr)
      • multi-clause (fun ident pat ... = expr | ident pat ... = expr)
      • op (fun op ident pat ... = expr)
      • tyvar (fun 'a ident pat ... = expr)
      • typed (fun ident pat ... : ty = expr)
      • and (fun ident pat ... = expr and ident pat ... = expr)
    • type (type ident = ty)
    • datatype
      • datatype ident = Con of ty | Con ...
        • basic (datatype ident = Con of ty | Con ...)
        • tyvar (datatype 'a ident = Con of ty | Con ...)
        • and (datatype ident = Con | ... and ident = Con | ...)
        • withtype (datatype ident = Con ... withtype ..)
      • datatype ident = datatype ident
    • abstype
    • exception
    • local ... in ... end
    • open ..
    • decl ; decl
      • decl decl
      • decl ; decl
    • infix
    • infixr
    • nonfix
  • Expressions
    • special constant
      • integer
      • real
        • 123.456
        • 123e456
        • 123E456
        • 123e~456
      • word
      • char
      • string
    • value identifier
    • op
    • record
      • basic ({ label = expr , ...})
      • tuple
      • 0-tuple
      • #label
    • list ([expr, ..., expr])
    • (expr; ...; expr)
    • paren ((expr))
    • let .. in .. end
      • basic (let decl ... in expr end)
      • derived (let decl ... in expr; ...; expr end)
    • function application
    • infix operator
      • L
      • R
    • typed (exp : ty)
    • exception
      • handle
      • raise
    • fn
      • basic (fn ident => expr)
      • pattern (fn pat => expr)
      • multi-clause fn pat => expr | pat => expr ...
    • andalso
    • orelse
    • if .. then .. else
    • while .. do ..
    • case .. of ..
  • Pattern
    • wildcard
    • special constant
      • integer
      • word
      • char
      • string
    • value identifier
    • op
    • record
      • basic ({ label = pat , ...})
      • wildcard (...)
      • label as variable ({ var (as pat), ...})
      • tuple
      • 0-tuple
    • list
    • paren
    • Constructor
    • infix
    • typed (pat : ty)
    • layerd (ident as pat)
  • Type
    • type variable
    • record
    • type construction
      • without param (ident)
      • with param (ty ident)
    • tuple
    • function
    • paren
  • Initial Basis
    • unit
    • bool
      • true
      • false
    • int
    • word
    • string
    • char
    • list
      • nil
      • ::
    • ref
      • ref
      • :=
    • exn
    • =
    • Match
    • Bind
  • Overloaded
    • +
    • -
    • *
    • div
    • mod
    • /
    • ``
    • =
    • abs
    • ~

Module

not yet implemented

Program

  • Program
    • decl (decl decl ...)
    • expr (expr decl ...)
      • Note: toplevel expression expr should be treated as val it = expr

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustcompilerruststandard-mlwebassembly

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言