发布于 2017-01-02 23:48:31 | 163 次阅读 | 评论: 0 | 来源: 网友投递
PureScript 静态类型语言
PureScript 是个小巧而强大的静态类型语言,可以编译成 JavaScript。purescript 主要是由 Haskell 和 PureScript 编写的。
PureScript 0.10.4 发布了,
主要更新内容:
新功能
Deriving Functor:
The Functor type class can now be derived using the standard derive instance syntax:
newtype F a = F { foo :: Array a, bar :: a } derive instance functorF :: Functor F
User-Defined Kinds:
Custom kinds can now be defined using the foreign import kind syntax:
foreign import kind SymbolList
Custom kinds can be ascribed to types using foreign import data declarations, as usual:
foreign import data Nil :: SymbolList foreign import data Cons :: Symbol -> SymbolList -> SymbolList
Source Maps in psc-bundle:psc-bundle will now generate source maps if the--source-maps flag is used.
Solving CompareSymbol and AppendSymbol:Support for the new purescript-typelevel-prelude library has been added to the compiler. CompareSymbol and AppendSymbol constraints will now be solved automatically for literal symbols.
New psc-package Features
完整更新内容请查看发行日志
下载地址: