Closed amesgen closed 6 months ago
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": https://github.com/tweag/ormolu/blob/05647fd4743ddd0490603625e72b094fba2cc078/src/GHC/DynFlags.hs#L29-L30
JavaScriptFFI
But we are only parsing the code, so there is no reason why Ormolu shouldn't be able to format this code.
The snippet
can't be formatted due to
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": https://github.com/tweag/ormolu/blob/05647fd4743ddd0490603625e72b094fba2cc078/src/GHC/DynFlags.hs#L29-L30But we are only parsing the code, so there is no reason why Ormolu shouldn't be able to format this code.