[GHC] #13090: Expose all unfoldings of overloaded functions by default
GHC
ghc-devs at haskell.org
Tue Jan 10 20:16:23 UTC 2017
#13090: Expose all unfoldings of overloaded functions by default
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner:
Type: bug | 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): Phab:D2929
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by rwbarton):
Replying to [comment:2 j.waldmann]:
> As a user, yes, I would welcome an easy way to have "overloaded
functions specialised at call sites".
But there must be limits surely. For example in GHC there are plenty of
functions that are hundreds of lines long. They happen to (mostly?) not be
overloaded, but if they were then it would surely not be sensible to copy
them into every client module once for every type at which they are used.
> Attaching a pragma to each of them is not "easy", but a compiler option
(per module, or per cabal project) is.
Sure, but a compiler option is not "by default".
> If compile times/code sizes go up, so be it. It's a price to pay for
faster executables.
If you opt into it, okay. Slow compile times are pretty much the most
common complaint about GHC as far as I've seen.
mpickering suggested on IRC that we might by default only do this for
small functions; I'd be much happier about that (and it does seem like it
would have real runtime performance gains).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13090#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list