Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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 4,823
    • Issues 4,823
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 446
    • Merge requests 446
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #17037

Closed
Open
Created Aug 07, 2019 by Sophie Taylor@spacekittehReporter

Stock deriving improvements

Motivation

Trying to use GHC-derived code in performance-sensitive applications leads to several problems:

  1. SPECIALISE pragmas have nothing to inline if the relevant types with GHC-derived instances are defined in another file
  2. No class law RULES seem to be generated, either. This is particularly troublesome with DeriveFunctor/DeriveFoldable/DeriveTraversable.

Proposal

  1. GHC-derived instances should have INLINABLE pragmas.
  2. I'm pretty certain that GHC generates law-abiding instances for Functor/Foldable/Traversable, so the relevant laws should be generated as RULES specific for the types its generating instances for.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking