refactor modules to separate parsing and macros from typechecking and printing
Description
I refactored the module hierarchy to separate the morley
parsing and macro expansion functionality (which we will want to extend) from the Michelson types and typechecking (which we want to make more strict).
Related issue(s)
https://issues.serokell.io/issue/TM-7 https://issues.serokell.io/issue/TM-2
This partially resolves TM-7, in that it sets up a good framework for implementing the various syntactic sugar ideas proposed there. However the architecture here is slightly different, so if this MR is accepted I will update TM-7 to reflect this.
In particular, the new overall pipeline for morley
will now be based roughly on the following:
Morley.Parser : MorleySyntaxText -> MorleyTypes (including Properties)
Morley.Macro : MorleyTypes -> MichelsonTypes
Michelson.Typecheck : MichelsonTypes -> (Pass | Fail)
Michelson.Runtime : MichelsonTypes -> Computation
Morley.Testing : MorleyTypes -> (Michelson.Typecheck, Michelson.Runtime) -> (Computation, TestResults)
Morley.Printer : MorleyTypes -> MichelsonSyntaxText
✅ 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