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,263
    • Issues 5,263
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 570
    • Merge requests 570
  • 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
  • #17562
Closed
Open
Issue created Dec 10, 2019 by Richard Eisenberg@raeDeveloper

`Any` appearing in a quantified constraint

If I say

{-# LANGUAGE QuantifiedConstraints, MultiParamTypeClasses #-}

module Bug where

class (forall a. a b ~ a c) => C b c

I get

Bug.hs:5:1: error:
    • Illegal type synonym family application ‘GHC.Types.Any
                                                 @*’ in instance:
        (a b :: GHC.Types.Any @*) ~ (a c :: GHC.Types.Any @*)
    • In the quantified constraint ‘forall (a :: k -> GHC.Types.Any).
                                    a b ~ a c’
      In the context: forall (a :: k -> GHC.Types.Any). a b ~ a c
      While checking the super-classes of class ‘C’
      In the class declaration for ‘C’
  |
5 | class (forall a. a b ~ a c) => C b c
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is a specific case of #17567 (closed). Despite superficial similarity, this is unrelated to #16775 (closed).

Edited Dec 16, 2019 by Richard Eisenberg
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking