Idris 2 v0.4.0 发布,类 Haskell 的纯函数编程语言

栏目: 软件资讯 · 发布时间: 4年前

内容简介:Idris 2 v0.4.0 发布。此版本主要变更包括语法变化、编译器变更、REPL/IDE 模式变更。 语法变化 Desugar non-binding sequencing in do blocks to (>>) (#1095) Multiline Strings with """ as delimiters (#109...

Idris 2 v0.4.0 发布。此版本主要变更包括语法变化、编译器变更、REPL/IDE 模式变更。

语法变化

  • Desugar non-binding sequencing in do blocks to (>>) (#1095)
  • Multiline Strings with """ as delimiters (#1097)
  • Force strict indentation after usage of with keyword (#1107)
  • The syntax for parameter blocks has been updated. It now allows to declare implicit parameters and give multiplicities for parameters. The old syntax is still available for compatibility purposes but will be removed in the future.
  • Add support for SnocList syntax: [< 1, 2, 3] desugars into Lin :< 1 :< 2 :< 3 and their semantic highlighting.
  • Underscores can be used as visual separators for digit grouping purposes in integer literals: 10_000_000 is equivalent to 10000000 and 0b1111_0101_0000 is equivalent to 0b111101010000. This can aid readability of long literals, or literals whose value should clearly separate into parts, such as bytes or words in hexadecimal notation.

编译器变化

  • Added more optimisations and transformations, particularly on case blocks, list-shaped types, and enumerations, so generated code will often be slightly faster.
  • Added --profile flag, which generates profile data if supported by a back end. Currently supported by the Chez and Racket back ends.
  • New %builtin pragma for compiling user defined natural numbers to primitive Integers (see the docs)
  • The version field in .ipkg files is now used. Packages are installed into a directory which includes its version number, and dependencies can have version number ranges using <=<>=>== to express version constraints. Version numbers must be in the form of integers, separated by dots (e.g. 1.00.3.03.1.4.1.5 etc)
  • Idris now looks in the current working directory, under a subdirectory depends for local installations of packages before looking globally.
  • Added an environment variable IDRIS2_PACKAGE_PATH for extending where to look for packages.
  • Added compiler warnings flags (-W prefix):
    • -Wno-shadowing: disable shadowing warnings.
    • -Werror: treat warnings as errors.
  • Experimental flag (-Xcheck-hashes) to check hashes instead of filesystem times to determine if files should be recompiled. Should help with CI/CD caching.

详情查看 Changelog


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

深入浅出React和Redux

深入浅出React和Redux

程墨 / 机械工业出版社 / 2017-4-28 / 69

本书作者是资深开发人员,有过多年的开发经验,总结了自己使用React和Redux的实战经验,系统分析React和Redux结合的优势,与开发技巧,为开发大型系统提供参考。主要内容包括:React的基础知识、如何设计易于维护的React组件、如何使用Redux控制数据流、React和Redux的相结合的方式、同构的React和Redux架构、React和Redux的性能优化、组件的测试等。一起来看看 《深入浅出React和Redux》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试