On Tuesday, January 17, 2017 at 5:23:33 AM UTC, GordonBGood wrote: > > On Monday, 16 January 2017 21:09:43 UTC+7, Rupert Smith wrote: >> >> On Saturday, January 14, 2017 at 1:51:39 AM UTC, GordonBGood wrote: >>> >>> 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. >>> >> >> Yes, that is what I was getting at. If you compile Elm -> Ocaml -> >> Javascript, then the Native stuff in Elm just gets copied into the output >> javascript directly (unless of course passing it through Ocaml is >> worthwhile and can optimize it). But if you are going Elm -> Ocaml -> >> native x86_64 binary, then the javascript needs to be compiled through >> Ocaml. So I was just wondering if the Ocaml tool-chain already has a >> javascript front-end for it? >> > > Writing a JavaScript front end for OCaml would be an ambitious undertaking > because JavaScript does not resemble OCaml in the least and there wouldn't > seem much point: >
Yes, that is what I thought. I probably missed some context out when quoting, but my question was in response to OvermindDL1's suggestion that moving to OCaml would open up the possibility of compiling to different back-ends other than javascript. An alternative might be to re-write the Native modules in the Elm core in OCaml. There isn't a huge amount of it. -- 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.
