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,385
    • Issues 4,385
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 370
    • Merge Requests 370
  • 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
  • #13252

Closed
Open
Opened Feb 09, 2017 by Edward Z. Yang@ezyangDeveloper

Perf: Make dep_finsts a map from type family Name to Module

Today, when we do a family consistency check, we always do a pairwise comparison of every module, even though most of the time, the modules don't even define instances of the same family (making the check futile.)

A far better strategy is to say, for any family, which modules transitively below us define instances for it, and only check THOSE pairwise. All we have to do is turn dep_finsts from a list of modules into a mapping from type family names to modules; then we can union the maps and do pairwise comparisons as before.

Note that we want to RECORD the map from Name to Module, because we expect any family to have instances defined in many modules (Module to Name is better if a single module defines instances for many families, but clearly this is rare.)

This is related to #9717, in that the proposed map here is a more coarse version of what was proposed in that ticket. This may strike a happy compromise between keeping interface files small and speeding things up.

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