<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi all,<div class=""><br class=""></div><div class="">I've reviewed Arnaud's <a href="https://github.com/ghc-proposals/ghc-proposals/pull/624" class="">https://github.com/ghc-proposals/ghc-proposals/pull/624</a> and wish to recommend acceptance.</div><div class=""><br class=""></div><div class="">The proposal is an amendment to the proposal for linear types, adding support for linear let bindings.</div><div class=""><br class=""></div><div class="">Today, if you have</div><div class=""><br class=""></div><div class="">f :: T %1-> T</div><div class="">f t = let t2 = t in t2</div><div class=""><br class=""></div><div class="">you'll get an error because t2 is not linear. The only way to bind a linear variable is via a `case`, never a `let` or `where`. This is annoying. With this proposal, the little program above is accepted, with an inferred linearity restriction on t2. Users can also annotated their lets like `let %1 x = ... in ...`. Bindings in `where` clauses can also be inferred or annotated as linear.</div><div class=""><br class=""></div><div class="">There is a downside, of course: linear bindings have various restrictions, chiefly that they must be strict bindings (because projections are hard with linear types) and that bindings cannot be generalized. I'm a little unsure that the choices in the proposal (particularly around generalization) are the best for users, but I think the best way to learn is to experiment. In my understanding, the community knows that -XLinearTypes is subject to revision, and so I think we should just blast ahead, revising if and when necessary.</div><div class=""><br class=""></div><div class="">Please share your thoughts!</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Richard</div></body></html>