Skip to content

Rewrite of the standard library

Christian Rinderknecht requested to merge rinderknecht@stdlib into dev

Motivation and Context

The standard library needs to be better written and documented.

Description

Component

  • compiler
  • website
  • webide
  • vscode-plugin
  • debugger

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Performance improvement (non-breaking change that improves performance)
  • None (change with no changelog)

Changelog

  • Added a module Big_set (lazily accessed sets, based on Big_map)
  • Documentation for CameLIGO and JsLIGO.
  • Introduced local type t aliases in modules Set, List, Map etc.
  • Renamed the type parameters for maximum readability.
  • Added, when meaningful, functions of_list that can take a list expression that may not be a literal.
  • Deprecated some functions and added equivalent ones with a better name (e.g, List.head and List.head_opt).
  • Added either a function size or length so all modules have both.
  • Same for sub and slice whenever meaningful.
  • Added functions empty in all modules.
  • Simplified implementations, made them uniform (order of constructors in pattern maching, for example), tried to avoid relying on built-ins.
  • The module Option was messy.

Checklist:

  • If a new syntax has been introduced, put a message on slack ligo-lsp
  • Changes follow the existing coding style (use dune @fmt to check).
  • Tests for the changes have been added (for bug fixes / feature).
  • Documentation has been updated.
  • Changelog description has been added (if appropriate).
  • Start titles under ## Changelog section with #### (if appropriate).
  • There is no image or uploaded file in changelog
  • Examples in changed behaviour have been added to the changelog (for breaking change / feature).
Edited by Laurent Canis

Merge request reports