[GHC] #12015: Add conditional CallStack constraints to common partial utility functions

#12015: Add conditional CallStack constraints to common partial utility functions -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: task | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- There are a variety of common utility functions used throughout GHC which are partial (e.g. many of the helpers in `Type`, for instance, `kindPrimRep`). It would be great if [ImplicitCallStacks] would identify their callers. However, we likely don't want to pay the cost of passing around `CallStacks` during normal compilation so I propose we make them conditional on `DEBUG`. That is, define {{{#!hs #if DEBUG type DebugCallStack = CallStack #else type DebugCallStack = (() :: Constraint) #endif }}} Now we can sprinkle `DebugCallStack` constraints about GHC and get the best of both worlds! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12015 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12015: Add conditional CallStack constraints to common partial utility functions -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: task | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): I'm all for it! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12015#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12015: Add conditional CallStack constraints to common partial utility functions -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: task | Status: patch Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2527 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => patch * differential: => Phab:D2527 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12015#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12015: Add conditional CallStack constraints to common partial utility functions -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: task | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2527 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed Comment: Landed in 626db8f82e734e48eef5ce7676a5233f98fe7145. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12015#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC