diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2015-09-07 13:48:10 +0200 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2015-09-07 13:54:15 +0200 |
commit | c6b82e99f41e03d4b101b3a32312defad711f56a (patch) | |
tree | 40b80555d2ff604603be4272476db3b0be384547 /boot | |
parent | dc671a1c06736b192e4a53f580e17356ffa7224e (diff) | |
download | haskell-c6b82e99f41e03d4b101b3a32312defad711f56a.tar.gz |
Further simplify the story around minimum/maximumwip/D1229
After I have found out that I should look at -ddump-prep and not
-ddump-core, I noticed that these days, GHC is perfectly capeable of
turning (the equivalent) of foldl to (the equivalent) of foldl' if the
operation in question is strict. So instead of using rewrite rules to
rewrite maximum to a strictMaximum for certain types, we simply use
SPECIALIZE.
This also marks maximum/minimum as INLINEABLE, so that client code can
get similar specializations, hopefully even automatically. And inded,
minimum applied to [Double] produces good code (although due to
inlineing, not due to specialization, it seems).
I checked (by looking at the core) that this still fixes #10788.
Differential revision: https://phabricator.haskell.org/D1229
Diffstat (limited to 'boot')
0 files changed, 0 insertions, 0 deletions