Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,396
    • Issues 4,396
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 379
    • Merge Requests 379
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #10335

Closed
Open
Opened Apr 21, 2015 by Simon Peyton Jones@simonpjDeveloper

Failure to construct superclasses in instance

Consider

{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, ConstraintKinds #-}

module Foo where

class Eq a => C a b

type X a = (Eq a, Show a)

instance X a => C a [b]

HEAD gives

Foo.hs:8:10:
    Could not deduce (Eq a)
      arising from the superclasses of an instance declaration
    from the context: X a
      bound by the instance declaration at Foo.hs:8:10-23
    Possible fix: add (Eq a) to the context of the instance declaration
    In the instance declaration for ‘C a [b]’

This is fall-out from refactoring the silent-superclass story. Patch coming.

Trac metadata
Trac field Value
Version 7.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
7.10.2
Milestone
7.10.2 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#10335