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,392
    • Issues 4,392
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 374
    • Merge Requests 374
  • 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
  • #5998

Closed
Open
Opened Apr 11, 2012 by errge@trac-errge

GHCi's :info to return all the visible instances, not just the ones imported from currently loaded files

Haskell report 5.4 says that instance visibility is transitively kept amongst module imports.

So, if A imports B, B imports C, and inside C.hs I have instance Eq C, it is enough to import A in Main.hs to have the Eq C instance visible. It is not required to import C directly.

When I use the import chain, the compiler works correctly, but ghci :info Eq doesn't report C as an instance, only if I import C directly.

This behavior is misleading, because if someone is not familiar with the specification, may believe after trying with :info that the instance is not transitively visible.

I attached a test for this issue, after unpacking you can use demo.sh to demonstrate the issue.

Trac metadata
Trac field Value
Version 7.4.1
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
7.6.2
Milestone
7.6.2
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#5998