-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Hello. I have been experimenting with various backends for Pointless. The first mildly successful attempt at writing one of these was this compiler that compiles Pointless to Lua but as I was working on it, I hit a realization that most of this stuff could be just as well represented in a statically typed and compiled language. This set me looking for good statically typed backends for Pointless and then I explored options like the JVM but had to abandon it since it quite famously doesn't support TCO. Finally the best compilation target for it, in the statically-typed world, in my opinion, is Haskell.
So I have spent some time creating this Pointless to Haskell compiler. It still doesn't implement the entire language, for instance, it's missing many of the language fields that equip Pointless with marketable IO, the inclusion of prelude in a separate scope, and still isn't as flexible with its module system as the interpreter. Its performance will also be improved by implementing more efficient visual representations of available types. Anyways, the point is that now Pointless can be compiled to Haskell and then be compiled to native machine code by GHC with free optimizations.
I would like to know your opinion on the implementation and would also like to get some advice on if interop with Haskell would be appropriate for Pointless because, if it gets to interop with Haskell it can leverage Haskell's entire ecosystem of libraries such as Parsec, Network, GTK, and similar stuff with bindings.