Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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,828
    • Issues 4,828
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 447
    • Merge requests 447
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #18400

Closed
Open
Created Jun 26, 2020 by Richard Eisenberg@raeDeveloper

Instances do not respect functional dependency, yet are accepted

Taken from #7875 (closed):

class Het a b | a -> b where
  het :: m (f c) -> a -> m b

class GHet (a :: Type -> Type) (b :: Type -> Type) | a -> b
instance            GHet (K a) (K [a])
instance Het a b => GHet (K a) (K b)

data K x a = K x

Ticket #7875 (closed) is about a problem that arises later... but I'm flummoxed as to why these instances are accepted. The two instances of GHet seem quite assuredly to violate its fundep. Yet ticket #7875 (closed) seems unconcerned about this issue, so I'm reluctant to fix until someone agrees that these instances are indeed problematic. Help?

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