PureScript 是个小巧而强大的静态类型语言,可以编译成 JavaScript。purescript 主要是由 Haskell 和 PureScript 编写的。

v0.10.0-rc.1 更新内容如下:

主要变化:

The new functional dependencies feature fixes type inference in some cases involving multi-parameter type classes. However, due to a bug in the compiler, some of those expressions were previously type checking where they should not have. As a result, it is necessary to add functional dependencies to some classes in order to make previous code type-check in some cases. Known examples are:

These libraries will be updated before the final release of 0.10.*, but you might experience some issues in the meantime.

新功能:

Data.Newtype Deriving

It is now possible to derive the Newtype class for any data declaration which is a newtype, using the existing deriving instance syntax:

newtype Test = Test String

derive instance newtypeTest :: Newtype Test _

Note that the second type argument should be specified as a wildcard, and will be inferred.

完整版更新内容请查看:https://github.com/purescript/purescript/releases

下载地址:



新闻来源:PureScript v0.10.0 rc1 发布,静态类型语言