[TM-7] Implement and document some Morley language extensions (jcb/tm7-language)
Description
[General] Modularize Parser into:
- Morley.Parser
- Morley.Default
- Morley.Parser.Annotations
[TM-7] Implement and document some Morley language extensions:
- Tuple pairs:
(pair a b) ~ (a, b)
- Nested tuples:
(a,(b,c) ~ (a,b,c)
- Bar unions:
(or a b) ~ (a | b)
- Nested unions:
(a | (b | c)) ~ (a | b | c)
- Slash lambda:
(lambda a b) ~ (\ a -> b)
- Paren unit:
unit ~ ()
,Unit ~ ()
- Container type syntax:
list a ~ [a]
,set a ~ {a}
- Lower case ops: e.g.
DROP ~ drop
Related issue(s)
https://issues.serokell.io/issue/TM-7
- Implements basic extensions
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
-
I checked whether I should update the docs and did so if necessary: - README
- Haddock
-
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by John Burnham