Skip to content

Instantly share code, notes, and snippets.

@erantapaa
Last active October 26, 2015 03:55
Show Gist options
  • Save erantapaa/e1d4a453a15e534e9c85 to your computer and use it in GitHub Desktop.
Save erantapaa/e1d4a453a15e534e9c85 to your computer and use it in GitHub Desktop.
build a Dash docset for the GHC API

Instructions for building a Dash docset for the GHC API (for ghc 7.10.2)

The ghc module is hidden by default, so it's not included in any of the Haskell docsets I could find. Here is a recipe for building a docset which contains just ghc-7.10.2.

Step 1. Build https://github.com/erantapaa/haddocset

Step 2. Find the location of the ghc package conf file. If you have installed the Haskell Platform it will reside at:

/Library/Frameworks/GHC.framework/Versions/7.10.2-x86_64/usr/lib/ghc-7.10.2/package.conf.d/ghc-7.10.2-XXXXXX.conf

Step 3. Run the command:

haddocset -t ghc-7.10.2 --hc-pkg "" create --CFBundleName "GHC 7.10.2 API" --CFBundleIdentifier "ghc-7.10.2" "$GHC_PKG_CONF"

where $GHC_PKG_CONF is the path determined in step 2.

Step 4. Re-hide the ghc-7.10.2 package with: ghc-pkg hide ghc-7.10.2.

Step 5. The docset resides in the directory ghc-7.10.2.docset. Double click it or use the open command to load it into Dash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment