[GHC] #10738: Make Exception datatypes into newtypes
#10738: Make Exception datatypes into newtypes -------------------------------------+------------------------------------- Reporter: | Owner: RyanGlScott | Type: feature | Status: new request | Priority: normal | Milestone: Component: | Version: 7.10.2 libraries/base | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: #4961 Differential Revisions: | -------------------------------------+------------------------------------- Certain instances of `Exception` in `base` are datatypes with only one argument: {{{#!hs data RecUpdError = RecUpdError String data RecConError = RecConError String data RecSelError = RecSelError String data PatternMatchFail = PatternMatchFail String data NoMethodError = NoMethodError String data AssertionFailed = AssertionFailed String }}} Why not make these into `newtype`s? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10738> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10738: Make Exception datatypes into newtypes -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: | RyanGlScott Type: feature request | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #4961 | Differential Revisions: Phab:D1131 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * owner: => RyanGlScott * differential: => Phab:D1131 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10738#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10738: Make Exception datatypes into newtypes -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: | RyanGlScott Type: feature request | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #4961 | Differential Revisions: Phab:D1131 -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"b12dba7829742de98a483645142c7962b9dd9f3f/ghc" b12dba78/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="b12dba7829742de98a483645142c7962b9dd9f3f" Make Exception datatypes into newtypes Certain instances of `Exception` are simply datatypes with only one argument, which should be `newtype`s. Reviewers: ekmett, hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1131 GHC Trac Issues: #10738 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10738#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10738: Make Exception datatypes into newtypes -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: | RyanGlScott Type: feature request | Status: closed Priority: normal | Milestone: Component: libraries/base | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #4961 | Differential Revisions: Phab:D1131 -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10738#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10738: Make Exception datatypes into newtypes -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #4961 | Differential Revisions: Phab:D1131 -------------------------------------+------------------------------------- Changes (by thomie): * status: closed => new * owner: RyanGlScott => * resolution: fixed => Comment: This caused a performance regression, see https://perf.haskell.org/ghc/#revision/b12dba7829742de98a483645142c7962b9dd9... {{{ nofib/time/cryptarithm1 0.374 + 7.22% 0.401 seconds }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10738#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10738: Make Exception datatypes into newtypes -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: feature request | Status: closed Priority: normal | Milestone: 8.0.1 Component: libraries/base | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #4961 | Differential Revisions: Phab:D1131 -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => fixed * milestone: => 8.0.1 Comment: That benchmark isn't very stable. perf.haskell.org/ghc reports reports 0.385 seconds currently, and it jumps up and down quite a bit. Let's close this. https://perf.haskell.org/ghc/#graph/nofib/time/cryptarithm1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10738#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC