Is simplified subsumption really necessary?
John Ericson
john.ericson at obsidian.systems
Fri Jun 18 15:55:49 UTC 2021
On 6/16/21 12:00 PM, Simon Peyton Jones via ghc-devs wrote:
> I’m sorry to hear that Chris. It’s exactly backwards from what I would
> expect – the typing rules with simple subsumption are, well, simpler
> than those for complicated subsumption, and so one might hope that
> your intuition had fewer complexities to grapple with.
>
In https://richarde.dev/papers/2021/stability/stability.pdf it is written
The analysis around stability in this paper strongly suggests that
GHC should use the lazy, shallow approach to instantiation. Yet the
struggles with lazy instantiation above remain. In order to simplify
the implementation, GHC has recently (for GHC 9.0) switched to use
exclusively eager instantiation.This choice sacrifices stability for
convenience in implementation.
I think the principles outlined in the paper are very good, and explain
the queasiness some users may feel in 9.0
> But wouldn't it be possible to choose a desugaring with seq that
> doesn't do so?
>
> I just don’t know how to do that. Maybe someone else does.
>
Is it not
f `seq` \x -> f x
and similar? I haven't thought about the issue in a while or in very
much depth, but when I first discussed the proposal years back with some
other people at work, they spit-balled the same counter-proposal.
----
Having little "skin in the game" as I haven't yet ported any serious
programs over to 9.0, I suppose I am glad the experimentation with
QuickLook is happening, and OK that our accepting on-par fewer programs
now opens design space for later (i.e. we got the breakage out of the
way.) But I certainly think there are improvements in the spirit
outlined in Richard's paper to be done down the road.
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20210618/7acd0226/attachment.html>
More information about the ghc-devs
mailing list