You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
Today, Haddock relies on the GHC API to re-typecheck modules for which it is generating documentation. This both increases the surface area of the GHC-Haddock interface and leads to unnecessarily long compilation times. Historically this was necessary because GHC had no means of persisting Haddock documentation in its build artifacts.
In 2018 we started down the road of preserving docstrings in GHC's interface files (see the GSoC proposal). The GHC side of this resulted in two commits (one in 2018 and another in 2021) which together introduce the necessary fields into GHC's interface file syntax along with necessary parsing logic, and implement a :doc command to GHCi. During the course of this work Haddock was minimally updated (e.g. see 0280391) to track the changes made in GHC. However, there is a larger refactoring that still needs to be done...
Specifically, Haddock should be refactored to drop its typechecking logic and instead load the already-compiled interface files of the modules being documented from disk.
The text was updated successfully, but these errors were encountered:
@bgamari I think I'm on the verge of making things compile, however the patch was written prior to changes that happened in GHC 9.4.
Especially, I need to get a [ClsInst] to feed createInterface1. However this commit replaces the type of md_insts from [ClsInst] (what I seem to need) to InstEnv through mkInstEnv.
This is a territory in which I am everything but familiar, and some direction would be appreciated.
Today, Haddock relies on the GHC API to re-typecheck modules for which it is generating documentation. This both increases the surface area of the GHC-Haddock interface and leads to unnecessarily long compilation times. Historically this was necessary because GHC had no means of persisting Haddock documentation in its build artifacts.
In 2018 we started down the road of preserving docstrings in GHC's interface files (see the GSoC proposal). The GHC side of this resulted in two commits (one in 2018 and another in 2021) which together introduce the necessary fields into GHC's interface file syntax along with necessary parsing logic, and implement a
:doc
command to GHCi. During the course of this work Haddock was minimally updated (e.g. see 0280391) to track the changes made in GHC. However, there is a larger refactoring that still needs to be done...Specifically, Haddock should be refactored to drop its typechecking logic and instead load the already-compiled interface files of the modules being documented from disk.
The text was updated successfully, but these errors were encountered: