add support for syntax added with compiler 4.0
What does this MR do?
This adds support for new syntax added to compiler 4.0
and adds support for base
3.0
.
I tested using this program:
module test
import syntax
import Clean.PrettyPrint.Common
import Clean.PrettyPrint.Expression
import Clean.PrettyPrint.Util
Start = print zero import1
import1 =
{ import_module = ident "Data.GenEq"
, import_symbols = ImportSymbolsOnly [impDecl]
, import_file_position = NoPos
, import_qualified = NotQualified
}
impDecl = ID_GenericCase (ident "gEq") [!ident "OBJECT", ident "CONS"!]
ident n = {id_name = n, id_info = {pointer = NilPtrN}}
The output is from Data.GenEq import derive gEq OBJECT CONS
and I verified that this is accepted by the compiler as input.
Using ID_GenericDeriveClass
gives from Data.GenEq import derive class gEq OBJECT CONS
.
Changes to public APIs
Author's checklist (required)
-
If bugs have been solved, tests have been added (guidelines) -
A changelog entry has been added (guidelines) -
Newly added code is documented (guidelines) -
Newly added code has a style consistent with the rest of the repository -
Intermediate commits compile (use git rebase -i main
if not)
Related issues
Edited by Steffen Michels