[ghc-steering-committee] Proposal #624 on linear let-bindings; recommendation: accept
Moritz Angermann
moritz.angermann at gmail.com
Thu Jan 25 08:07:19 UTC 2024
Arnaud, I agree that _we_ consider LinearTypes experimental. I hope we can
get https://github.com/ghc-proposals/ghc-proposals/pull/617 agreed on soon,
so that the compiler has
this knowledge as well. I am however not able to fully comprehend the
technical details of this proposal right and therefore will defer to others
on this!
On Thu, 25 Jan 2024 at 16:01, Arnaud Spiwack <arnaud.spiwack at tweag.io>
wrote:
> Moritz: there's one breakage introduced (but only for users of
> LinearTypes, which is considered experimental), namely that LinearTypes is
> proposed to now imply MonoLocalBinds.
>
> On Thu, 25 Jan 2024 at 07:18, Moritz Angermann <moritz.angermann at gmail.com>
> wrote:
>
>> I'll have to recuse myself from this, as much of this is currently going
>> above my head. My overall understanding is that
>> this mostly relaxes what we accept, and therefore won't break existing
>> code?
>>
>> Best,
>> Moritz
>>
>> On Thu, 25 Jan 2024 at 00:39, Arnaud Spiwack <arnaud.spiwack at tweag.io>
>> wrote:
>>
>>> On Wed, 24 Jan 2024 at 16:39, Simon Peyton Jones <
>>> simon.peytonjones at gmail.com> wrote:
>>>
>>>> Do newtypes make a difference? E.g let N x = e in ...
>>>> where N is the data contructor of a newtype?
>>>>
>>>
>>> I don't think it has too. So for the moment, I vote to stick to the
>>> current proposal and consider this like all lazy non-variable patterns:
>>> must be unrestricted.
>>>
>>> I suspect that there's a possible refinement where we say that a happy
>>> pattern is either:
>>> - A variable
>>> - Strict
>>> - A newtype constructor where the inner pattern is happy.
>>>
>>> (then if pat is an unhappy pattern, `let pat` must be unrestricted).
>>>
>>> But I don't think I'm quite ready to go there for the time being, and
>>> that'll be a backward compatible change if we change our mind.
>>> _______________________________________________
>>> ghc-steering-committee mailing list
>>> ghc-steering-committee at haskell.org
>>> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>>>
>>
>
> --
> Arnaud Spiwack
> Director, Research at https://moduscreate.com and https://tweag.io.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20240125/5b1ec667/attachment-0001.html>
More information about the ghc-steering-committee
mailing list