Skip to content

[TM-7] Implement and document some Morley language extensions (jcb/tm7-language)

John Burnham requested to merge jcb/tm7-language into master

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:

Stylistic guide (mandatory)

Edited by John Burnham

Merge request reports