Type synonyms
Can/will type synonyms be added to FFG? And how they should be designed?
I'm willing to implement them if they belong here, but I'm unsure how exactly.
At my fork, I attempted to implement type synonyms as a part of let bindings:
let x = 3
type Test a = List a
let y : Test Natural = [x]
in y
... and while it works perfectly, it doesn't work with module system at all, so there's no way to move type declarations to another file.
Linking to some prior discussion on this topic: https://github.com/Gabriella439/grace/issues/53
(one big difference is that #53 is talking about adding builtin type synonyms, while it looks like you want user-defined type synonyms)
Well, my current implementation unwraps user types at type checking/subtype checking, at the end type introduction scope. And it generally works. The problem is just about modularity. How to make type synonyms the way it's possible to place them in the library and then reuse, because when you import something in FFG, you import an expression, and something of type Type is not an expression in FFG.
The only logical solution that I see is, well, allow expressions at type-level, but I'm not sure about the consequences of it all, and it seems not that easy to implement.