您的位置:首页 > IT > 正文

PureScript v0.15.8 发布,小巧而强大的静态类型语言-焦点速读

来源:OSCHINA     时间:2023-03-08 07:33:39

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

新功能:


(资料图)

生成的文档现在支持 dark 模式(#4438)。PureScript 文档有一个新的 dark主题可用。它将根据你的浏览器或系统的配色方案偏好自动使用。

Bug修复:

修复 instance deriving regression(#4432)

当类型不匹配时输出type-error发生的 label(#4411)

检查值声明时考虑 typed holes(#4437)。现在,编译器在为类型检查的值声明排序时会考虑 typed holes,从而允许建议更多 top-level values,而不是受限于 reverse lexicographical ordering。

Given:

module Main wherenewtype K = K IntaRinku :: Int -> KaRinku = KbMaho :: KbMaho = ?help 0cMuni :: Int -> KcMuni = KdRei :: Int -> KdRei _ = bMaho

Before:

Hole "help" has the inferred type              Int -> K            You could substitute the hole with one of these values:                             Main.cMuni  :: Int -> K    Main.K      :: Int -> K

After:

Hole "help" has the inferred type              Int -> K            You could substitute the hole with one of these values:                              Main.aRinku  :: Int -> K    Main.cMuni   :: Int -> K    Main.K       :: Int -> K

Other improvements:

将 Stackage snapshot升级到 lts-20.9,将 GHC 升级到 9.2.5(#4422、#4428和#4433)

Internal:

将 license/changelog scrips更新到最新的 Stack 解析器(#4445)

更新说明:https://github.com/purescript/purescript/releases/tag/v0.15.8

相关文章