diff --git a/CHANGELOG.md b/CHANGELOG.md index af0a454..13a2b52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added - Compiler warnings for the follwing: shadowing, negative spends, division by zero, unused functions, unused includes, unused stateful annotations, unused variables, unused parameters, unused user-defined type, dead return value. +- The pipe operator |> + ``` + [1, 2, 3] |> List.first |> Option.is_some // Option.is_some(List.first([1, 2, 3])) + ``` ### Changed - Error messages have been restructured (less newlines) to provide more unified errors. Also `pp_oneline/1` has been added. ### Removed diff --git a/docs/sophia_syntax.md b/docs/sophia_syntax.md index db438b5..b9c6aa0 100644 --- a/docs/sophia_syntax.md +++ b/docs/sophia_syntax.md @@ -234,6 +234,7 @@ Path ::= Id // Record field BinOp ::= '||' | '&&' | '<' | '>' | '=<' | '>=' | '==' | '!=' | '::' | '++' | '+' | '-' | '*' | '/' | 'mod' | '^' + | '|>' UnOp ::= '-' | '!' ``` @@ -245,6 +246,7 @@ UnOp ::= '-' | '!' | `!` `&&` `\|\|` | logical operators | `==` `!=` `<` `>` `=<` `>=` | comparison operators | `::` `++` | list operators +| `\|>` | functional operators ## Operator precendences @@ -261,3 +263,4 @@ In order of highest to lowest precedence. | `<` `>` `=<` `>=` `==` `!=` | none | `&&` | right | `\|\|` | right +| `\|>` | left