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,253
    • Issues 4,253
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 397
    • Merge Requests 397
  • 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
  • #11049

Closed
Open
Opened Nov 01, 2015 by Joachim Breitner@nomeataDeveloper

Allow CallStacks to be hidden or cut

This is a spin off of #11035. I’d like to see a way for a function foo

  • use another function bar with a (?_::CallStack) constraint so that bar will not print a call stack, and
  • use another function bar with a (?_::CallStack) constraint so that if bar prints a call stack, it will stop at the call to foo.

This might be possible to implement with a special rootCallStack :: CallStack which is a value such that

x `pushCallStack` rootCallStack = rootCallStack

but

rootCallStack `pushCallStack` x = rootCallStack “:” x

as before and a call stack that consists of only a rootCallStack causes no stack trace to be printed.

The use case is to provide the user of a library less cluttered call stacks that do not expose unhelpful details and allow her to quickly spot the relevant information.

Trac metadata
Trac field Value
Version 7.10.2
Type FeatureRequest
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#11049