Quantcast
Channel: OSCHINA 社区最新新闻
Viewing all articles
Browse latest Browse all 44834

PureScript 0.10.4 发布,静态类型语言

$
0
0

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-bundlepsc-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

完整更新内容请查看发行日志

下载地址:


Viewing all articles
Browse latest Browse all 44834

Trending Articles