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,274
    • Issues 4,274
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 412
    • Merge Requests 412
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #10316

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

Move Typeable type-rep generation from use site to definition site

This ticket is a continuation of #9858 (closed). The interim solution for 7.10 was to generate Typeable data structures on the fly, as needed in client modules. This ticket is about moving the generation of the runtime representation of type constructors to their definition sites. (#9858 (closed) already has too much going on in it, so I started a fresh ticket for this refactoring.)

The branch is wip/T9858-typeable-spj.

In favour of (A) code at use site (as in 7.10):

  • Pay as you go. No code at all is generated unless you use Typeable

In favour of (B) code at definition site:

  • More sharing. We make a TyCon (see Data.Typeable.Internal) for T (say) just once, in the module that defines T.
  • We may ultimately want the TyCon for T to include its source location, and perhaps more besides. If it is defined in T it becomes easier to do that.

General observation: (B) is like Typeable was before, when it was an ordinary class. The difference now is that all types are Typeable.

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
8.0.1
Milestone
8.0.1 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#10316