I wonder how feasible it would be to develop PureScript back-ends for Swift (for the Apple platforms), Java (for Android), and C# (for Windows).
The representation is fairly compact, so the requirements for a PureScript compiler backend are fairly minimal. You just have to translate all of the features of the IR:
- Functions with lexical scoping - Support for the primitive types defined by PureScript (we need to define some of these types more concretely in a specification) - A way to encode records. This could be something like JavaScript's objects, or just a map data structure.
The JS backend actually does more optimizations before code generation, but it starts from the same intermediate representation.
[1] https://github.com/paf31/24-days-of-purescript-2016/blob/mas...