On Friday, 13 January 2017 22:40:07 UTC+7, Rupert Smith wrote:
>
> On Friday, January 13, 2017 at 3:18:48 PM UTC, OvermindDL1 wrote:
>>
>> That is actually why I think Elm should compile to a a different 
>> back-end, like ocaml/bucklescript or so.  The syntax is uniform enough that 
>> making an elm->ocaml/bucklescript transpiler would be just a matter of 
>> re-using most of the existing parser in OCaml, which is already beyond 
>> blazing fast in comparison.  It would significantly reduce elm's compiling 
>> time, it would get it to a back-end that has far far more optimizing passes 
>> than elm itself does while being substantially better tested, and it would 
>> give a method of being able to compile elm to bare-metal for very fast 
>> server-side page generation. 
>>
>
> Now you're talking. 
>
> All that this would take would be to write an Elm parser into the first 
> stage of the OCaml pipeline? You'd also need to compile the Native modules, 
> is there already some way to feed them into the Ocaml pipeline?
>

Elm "Native" libraries are JavaScript, and that is what BuckleScript does: 
as well as output JS code, it also has JS FFI to allow BuckleScript code to 
call to/receive calls from JS code.  I think this would be handled by an 
Elm PP just as OCaml handles FFI references -  leaving FFI blanks to be 
later "filled in" by later passes.

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to