reasonml-community / belt

MIT License
49 stars 1 forks source link

readFile #18

Open chenglou opened 6 years ago

jaredly commented 6 years ago

would this delegate to node's fs or native, respectively?

chenglou commented 6 years ago

I'm thinking conditional compilation to both platforms. cc @bsansouci

chenglou commented 6 years ago

Actually, does bs' cppo work on reason files?

bsansouci commented 6 years ago

bsb-native supports this using matchenv, basically swaps the implementation of a module depend on the targeted backend.

bsansouci commented 6 years ago

@chenglou No bs' cppo can't work on reason because it's not valid syntax. If we can make refmt parse #if style things, that'd be amazing (I want that) lol

chenglou commented 6 years ago

I though the cppo pass comes before the parser pass?

jaredly commented 6 years ago

yeah it's definitely not valid ocaml