PureScript是个小巧而强大的静态类型语言,可以编译成JavaScript。PureScript主要是由Haskell编写的。
PureScript示例代码:
module Main whereimport Debug.Tracemain = trace "Hello, World!"编译成JavaScript代码:
var PS = PS || {};PS.Main = (function () { "use strict"; var Debug_Trace = PS.Debug_Trace; var main = Debug_Trace.trace("Hello, World!"); return { main: main };})();
评论