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,249
    • Issues 5,249
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 581
    • Merge requests 581
  • 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
  • Issues
  • #22151
Closed
Open
Issue created Sep 08, 2022 by Erik de Castro Lopo@erikdDeveloper

Incorrect constraint warnings from ghc 9.2.4

Summary

With the constraint, I get a redundant constraint warning and without it, i get a missing constraint warning.

Steps to reproduce

Minimal reproduction case redundant-constraint.tgz

WIth the code in the tarball I get:

    • Redundant constraints: (Applicative m, Monad m)
    • In the instance declaration for ‘ReportSchemaErrors m’

If I remove those constraints I get:

    • Could not deduce (Applicative m)
    • Could not deduce (Monad m)

The constraint cannot be both redundant and required.

If the class declaration is in the same file as the instance decalration its fine.

Expected behavior

After removing the redundant constraints, there should be no warning.

Environment

  • GHC version used: 9.2.4

Optional:

  • Operating System: Linux
  • System Architecture: x86_64
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking