It's it possible to call babel macros in purescript?

#1

Can it be called from purescript?

const x = eval`3+4`

Or

const x = <eval>3+4</eval>
#2

In an FFI module? Not if it isn’t JavaScript - the contents of FFI modules need to be parseable by the language-javascript parser so that it can do dead code elimination, and so that it can check that any foreign import statements in your PureScript code match up with the corresponding JS file. I think

const x = eval`3+4`

might work as of the most recent release, as language-javascript got some updates recently, but I highly doubt JSX ever will.

1 Like