Conversation
When using refmt, we end up with intermediate filenames that break our identifier generation.
This reverts commit 48fab60. The reason is that we can now generate a basic reason template with `-reason -template basic.ppx`
|
I'm surprised by the |
vasilisp
left a comment
There was a problem hiding this comment.
Thanks!
I have no comments on the code. Looks good.
I like the idea of using refmt during template instantiation.
I am a bit worried about the template/eliom-distillery interface. If we were to add a template using Ocamlbuild/Jbuilder/..., would we be able to interpret your fixed %%%REASON_FLAG%%%? Could this be customized? Or at least, could we allow individual templates to declare support for Reason (or lack thereof)?
|
Hmm that's a good point about the -reason flag being specific to eliomc, etc. I'm not sure how to customize it ... maybe we could change it to REASON_ELIOMC_FLAG to be more specific, or as you say declaring support for reason in the templates makes sense. What do you think? |
|
Sorry for the delay. The customizability of the flag and the declaration of Reason support could both be implemented via a per-template configuration/specification file. It could be useful for other features (e.g., supersede the existing For now, could you work-around the use of Thanks! |
This is building off of #445 by @vasilisp.
It's adding the -reason flag to eliom-distillery which converts the .eliom files to reason syntax. It also adds the
%%%REASON_FLAG%%%substitution which evaluates to"-reason"if -reason is passed to eliom-distillery and an empty string otherwise.Hopefully this gets ocsigen closer to reason support - I haven't been able to get it working with ocsigen-start, but this does generate a reason ocsigen program with:
The problems current with getting ocsigen start to work are in the translation from the ocaml to reason.
##.doesn't seem to work when converting from ocaml to reason, it's used in js_of_ocaml ppxIt's possible these problems are too great right now - we might want to wait to merge the -reason flag until there's support for ocsigen start. Either way, it's a little closer to reason and ocsigen!✈️