Even with GHCiD, GHCi responses are simply not machine parseable. There's no reliable grammar and there's no escape support. This is most obvious with the :show bindings GHCi builtin command with multi-line nested strings.
This is an upstream issue inherently, but is likely something we can provide a compelling need for and contribute the source code. A simple JSON reply (or some other format) seems easy enough to implement.
I would prefer not to ship with a custom version of GHC, so upstreaming such an effort is likely the only course of action here.
Even with GHCiD, GHCi responses are simply not machine parseable. There's no reliable grammar and there's no escape support. This is most obvious with the
:show bindingsGHCi builtin command with multi-line nested strings.This is an upstream issue inherently, but is likely something we can provide a compelling need for and contribute the source code. A simple JSON reply (or some other format) seems easy enough to implement.
I would prefer not to ship with a custom version of GHC, so upstreaming such an effort is likely the only course of action here.