Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,347
    • Issues 5,347
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 566
    • Merge requests 566
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Merge requests
  • !6165

Refactor SuggestExtension constructor in GhcHint

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Alfredo Di Napoli requested to merge wip/adinapoli-issue-20102 into master Jul 14, 2021
  • Overview 8
  • Commits 1
  • Pipelines 4
  • Changes 16

This commit refactors the SuggestExtension type constructor of the GhcHint to be more powerful and flexible. In particular, we can now embed extra user information (essentially "sugar") to help clarifying the suggestion. This makes the following possible:

Suggested fix: Perhaps you intended to use GADTs
               or a similar language extension to enable syntax: data T where

We can still give to IDEs and tools a LangExt.Extension they can use, but in the pretty-printed message we can tell the user a bit more on why such extension is needed.

On top of that, we now have the ability to express conjunctions and disjunctions, for those cases where GHC suggests to enable "X or Y" and for the cases where we need "X and Y".

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip/adinapoli-issue-20102