haskell-suite / haskell-src-exts

Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer
Other
193 stars 94 forks source link

GHCJS FFI "interruptible" safety level not supported. #396

Closed RobertFischer closed 6 years ago

RobertFischer commented 6 years ago

GHJS has an "interruptible" safety level: https://github.com/ghcjs/ghcjs/blob/master/doc/foreign-function-interface.md#interruptible

That fails to parse in Stylish Haskell, and throws an error about the literal string (JavaScript code) immediately following it being unparseable. I'm assuming the issue is here in haskell-src-exts, not in stylish-haskell.

RobertFischer commented 6 years ago

My bad: you need to have the InterruptibleFFI pragma enabled. Then it works just fine.