Proposal
Currently, PureScript's IDE capabilities make use of externs files to provide completion and type information to clients of purs ide server. It's sufficient enough for most use-cases although a coveted feature that's still missing is completion and type information for local bindings e.g. let-bound values or function arguments. Likewise, purs ide can be unusable for lower-spec machines especially on larger web projects.
This proposal aims to add a new JSON-based codegen target based on GHC's HIE files, which is a plaintext binary format which stores name and type information for source files. It's used by ghci to provide type-at-point capabilities as well as completion, and I believe we can likely do the same with purs repl. There also exists hiedb, which is a command-line tool for building up a database of .hie files that can be queried.
The data to be emitted will most likely come from the type checker, likely after a declaration has been type-checked and added to the environment. We could also feed this information to the IDE infrastructure in order to provide richer information, though we'd also want to remove externs in said infrastructure.
I'd like to work on this in the future once we've released 0.15.x, or at least once #4207 and #4235 is resolved.
Reactions are currently unavailable
Proposal
Currently, PureScript's IDE capabilities make use of externs files to provide completion and type information to clients of purs ide server. It's sufficient enough for most use-cases although a coveted feature that's still missing is completion and type information for local bindings e.g. let-bound values or function arguments. Likewise, purs ide can be unusable for lower-spec machines especially on larger web projects.
This proposal aims to add a new JSON-based codegen target based on GHC's HIE files, which is a plaintext binary format which stores name and type information for source files. It's used by ghci to provide type-at-point capabilities as well as completion, and I believe we can likely do the same with purs repl. There also exists hiedb, which is a command-line tool for building up a database of .hie files that can be queried.
The data to be emitted will most likely come from the type checker, likely after a declaration has been type-checked and added to the environment. We could also feed this information to the IDE infrastructure in order to provide richer information, though we'd also want to remove externs in said infrastructure.
I'd like to work on this in the future once we've released 0.15.x, or at least once #4207 and #4235 is resolved.