Language pragma `JavaScriptFFI` can't be parsed
amesgen opened this issue · 0 comments
amesgen commented
The snippet
{-# LANGUAGE JavaScriptFFI #-}
can't be formatted due to
<input>:1:1
The GHC parser (in Haddock mode) failed:
<input>:1:14: error: [GHC-46537]
Unsupported extension: JavaScriptFFI
This is because JavaScriptFFI
is only available for the JS backend currently, and so also on the WASM backend (see this GHC commit, first present in GHC 9.8, and upcoming merge request !11530 for JS FFI support for the WASM backend), but we currently set arch/OS to "unknown":
Lines 29 to 30 in 05647fd
But we are only parsing the code, so there is no reason why Ormolu shouldn't be able to format this code.