PureScript 0.10.4 发布了,PureScript 是个小巧而强大的静态类型语言,可以编译成 JavaScript。PureScript 主要是由 Haskell 和 PureScript 编写的。
主要更新内容:
新功能
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
软件详情:https://github.com/purescript/purescript/releases
下载地址:https://github.com/purescript/purescript/archive/v0.10.4.zip
来自:开源中国社区

