Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,247
    • Issues 4,247
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 398
    • Merge Requests 398
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Merge Requests
  • !3330

Open
Opened May 22, 2020 by Luke Lau@lukeDeveloper8 of 8 tasks completed8/8 tasks
  • Report abuse
Report abuse

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch "https://gitlab.haskell.org/luke/ghc.git" "th-addDoc"
git checkout -b "luke/ghc-th-addDoc" FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout "master"
git merge --no-ff "luke/ghc-th-addDoc"

Step 4. Push the result of the merge to GitLab

git push origin "master"

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

template-haskell: Add putDoc, getDoc and friends

  • Overview 98
  • Commits 1
  • Pipelines 30
  • Changes 32

This MR is an implementation of @mpickering's comment in #5467 It adds two new functions, addDoc and getDoc that can attach documentation to module headers, declarations, function arguments and class/family instances, as well as retrieve it, provided that Opt_Haddock is enabled. This part extends template-haskell and GHC's opt-haddock support, since Haddock doesn't seem to use the .hi files just yet there is a separate patch that integrates this into Haddock at this branch

Things to do:

  • Tests
  • Is String the right type for docs?
  • Add combinators
  • Take a closer look at getDoc (should probably allow it to lookup docs that were added via addDoc
  • Does that IORef in TcGblEnv need to be released?
  • What happens when Opt_Haddock isn't on?
  • How does this work with things defined outside of the module?
  • Rename addDoc to setDoc
Edited Jul 01, 2020 by Luke Lau
Assignee
Assign to
9.2.1
Milestone
9.2.1
Assign milestone
Time tracking
Reference: ghc/ghc!3330
Source branch: th-addDoc