Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C curry-frontend
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 72
    • Issues 72
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • curry
  • curry-frontend
  • Issues
  • #92
Closed
Open
Created Jun 10, 2020 by Fredrik Wieczerkowski@fwcdDeveloper

Provide quick fixes for error/warning messages

Idea

Attach recommended fixes to error/warning messages that can be solved "easily", e.g.:

  • Unused variables/type parameters/imports
    • This could have multiple 'fixes':
      • Remove the variable
      • Rename the variable to _ in the case of parameters
      • Prefix the variable with _ if #135 were to be implemented etc.
  • Duplicate imports
  • Required (but undeclared) language extensions
  • Missing top-level type signatures
  • Uninitialized record fields (see #125)
  • Unused do-bindings (see #134)
  • Migrations in the case of source breaks (e.g. if #135 were to be implemented)
  • etc.

Motivation

Having a unified solution for attaching fixes to a message, would make it easy to emit messages like this one from GHC:

import Prelude (True)
src/ImportSyntaxCheck/ImportDataConstr.hs:1:17: error:
    In module ‘Prelude’:
      ‘True’ is a data constructor of ‘Bool’
    To import it use
      import Prelude( Bool( True ) )
    or
      import Prelude( Bool(..) )
  |
1 | import Prelude (True)
  |                 ^^^^

This would also enable downstream features like language server support for fixable errors and subsequently improve the editing experience for Curry in LSP-supporting editors, as in this Rust example:

Screenshot

Edited Mar 03, 2022 by Fredrik Wieczerkowski
Assignee
Assign to
Time tracking