[GHC] #14364: Reduce repetition in derived Read instances
GHC
ghc-devs at haskell.org
Thu Oct 26 00:03:06 UTC 2017
#14364: Reduce repetition in derived Read instances
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone: 8.4.1
Component: Compiler | Version: 8.2.1
Resolution: | Keywords: deriving
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #10980 #7258 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"dbd81f7e86514498218572b9d978373b1699cc5b/ghc" dbd81f7/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="dbd81f7e86514498218572b9d978373b1699cc5b"
Factor out readField (#14364)
Improves compiler performance of deriving Read instances, as suggested
in the issue.
Additionally, we introduce `readSymField`, a companion to `readField`
that parses symbol-type fields (where the field name is a symbol, e.g.
`(#)`, rather than an alphanumeric identifier. The decision between
these two functions is made a compile time, because we already know
which one we need based on the field name.
Reviewers: austin, hvr, bgamari, RyanGlScott
Reviewed By: bgamari
Subscribers: RyanGlScott, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4108
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14364#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list