Skip to content
GitLab
Projects Groups Snippets
  • /
  • 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 5,364
    • Issues 5,364
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 573
    • Merge requests 573
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Merge requests
  • !5625

Replace (ptext .. sLit) with `text`

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Sylvain Henry requested to merge hsyl20/ghc:hsyl20/perf/ptext into master Apr 28, 2021
  • Overview 6
  • Commits 1
  • Pipelines 1
  • Changes 55
Replace (ptext .. sLit) with `text`

1. `text` is as efficient as `ptext . sLit` thanks to the rewrite rules

2. `text` is visually nicer than `ptext . sLit`

3. `ptext . sLit` encourages using one `ptext` for several `sLit` as in:

    ptext $ case xy of
      ... -> sLit ...
      ... -> sLit ...

  which may allocate SDoc's TextBeside constructors at runtime instead
  of sharing them into CAFs.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: hsyl20/perf/ptext