Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Latest commit

 

History

History
95 lines (62 loc) · 4.28 KB

Inspirations.md

File metadata and controls

95 lines (62 loc) · 4.28 KB

A list of links to concepts which may be worth looking at

Basically a list of what other projects are doing to solve similar problems, in no particular order

Scion-Tools

From the haskell-ide mailing list:

Yes, that is the concept for Scion (v2). I stopped working on it at
some point because it was so messy to get the necessary information
out of GHC. I did a little GHC API proof of concept with GHC 7.10
recently. That looks more promising. Also, Stack could take care of a
lot of build issues.

The basic idea is:
 - Building is not managed by GHC's --make mode. Instead an external
build manager (e.g., based on Shake) invokes compiler in one-shot
mode.
 - The compiler is basically GHC + hooks.
 - The compiler generates .hi files, optionally .o files, and .meta
files. This contains all meta data which may grow over time: error
messages, parse tree, renamed/typechecked code

A (logically) separate service manages and caches additional
information derived from the meta data. For example,
 - all error messages in the whole project (or which ones might be
outdated because a dependency has changed)
 - definition sites of all identifiers in the project
 - use sites of things
 - etc.

The IDE layer would sit on top of this separate service.

Open issues:
 - How are projects specified? Ideally stack based.
 - How are custom build steps integrated?
 - Will this work for GHCi?

I talked about this with Duncan Coutts (who was involved in the
backend that FP Complete IDE work) and they came to basically the same
conclusion. This work has now been open sourced, but I only took a
brief look at it a while ago. Probably worth another closer look.