mirror of
https://github.com/polarity-lang/polarity.git
synced 2025-07-07 21:15:04 +00:00
![]() * Add CST and parsing for infix declarations * Add infix declarations to symbol table * Add Infix decls to ast * Make testsuite run through again * Implement infix declarations * Validate binding structure of infix decls * Generate docs * Add testcases * Make tests run through again * Add checking of infix declarations * Add testcases * Check that RHS is defined * Fix clippy hints * Add hover information * Add infix to syntax of web editor --------- Co-authored-by: Tim Süberkrüb <dev@timsueberkrueb.io> |
||
---|---|---|
.. | ||
codata | ||
data | ||
README.md |
Standard Library
The Polarity Standard Library.
Overview
├── std The Polarity Standard Library
│ ├── codata A collection of commonly used codata types
│ └── data A collection of commonly used data types
Conventions
We follow the following naming conventions in the standard library:
- Polarity filenames and folder names are in
snake_case
. Example:data/option.pol
. data
andcodata
declaration names are inCamelCase
. Example:data Option
.- Destructors and top-level let bindings are in
snake_case
. Example:Fun.ap
. - Constructors are in
CamelCase
. Example:Some
.
Where syntax and naming decisions are arbitrary, we loosely follow the Rust conventions.
All declarations use ASCII characters only. This is to ensure that there is always a unique natural language term to refer to any given declaration. It also ensures the standard library can easily be searched and indexed. There may be non-ASCII Unicode characters in shorthand notation, comments and documentation strings.