Skip to content

GitLab

  • Menu
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 4,861
    • Issues 4,861
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 456
    • Merge requests 456
  • 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 Compiler
  • GHCGHC
  • Issues
  • #20076
Closed
Open
Created Jul 04, 2021 by Richard Eisenberg@raeDeveloper

Partial type signatures regression around simplifiable constraints

Consider

{-# LANGUAGE FlexibleContexts, PartialTypeSignatures #-}

module Bug where

f :: Eq [a] => a -> _
f x = [x] == [x]

This program is accepted in GHC 9.0.1, but rejected by HEAD. The problem is that we get a [W] Eq [a] from the function body, and then this is simplified to [W] Eq a... which cannot be satisfied.

The solution, I think, is to bring Eq [a] into scope as a Given, not a Wanted.

I have not tested it, but I smell the culprit in 5650c79e, @simonpj.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking