Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2023 13:08
Show Gist options
  • Save VeryMilkyJoe/268448ff8daea9f467930c771e60b9c8 to your computer and use it in GitHub Desktop.
Save VeryMilkyJoe/268448ff8daea9f467930c771e60b9c8 to your computer and use it in GitHub Desktop.
HSOC Write Up - Jana Chadt

HSOC Write Up - Jana Chadt


  • I updated the manual hls setup instructions to contributing easier for newcomers.
  • I managed a vscode release.
  • I worked on this PR which adds tracking of cabal files to vscode haskell.

This was the biggest part of my summer of code, and took quite a while to get merged, but we did get it done!

I wrote a blog post introducing hls' cabal support to the community, which highlights the features of the new completion system.

Additionally, there is documentation of the state of the completion system for cabal files in this mega issue.

Since this is a new plugin, there are bound to be a lot of bugs, thus some bug fixes followed:

  • suggestions for filepaths in main-is were not relative to the stanza's subdirectories which was fixed in this PR.
  • The context was not determined correctly inside of the stanzas sometimes which was fixed in this PR.

Add module code action

As described in this issue, it was requested to implement a code action which adds an unknown module to the cabal file to make the development process easier for newcomers.

The PR for this feature is currently still open and I am hoping to get it merged in the next few weeks.

Since the development process was quite finicky, I decided to implement a custom parser for cabal files in order to make the proof of concept more easy to read in the end.

This has sparked some discourse in the cabal community, and there is talk of improving the current parser within cabal to be usable for this feature, which would then replace the custom parser in the future.

Plans for the future

I am planning to publish the parser as a separate package from hls and I want to use it to implement some open features for the completion system, such as:

  • not suggesting keywords which already occur in the top level
  • not suggesting top level keywords after a stanza was already written somewhere before
  • rewriting the code establishing the current context of the cursor for completion suggestion making the code more easy to read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment