<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Yay levity polymorphism.<div class=""><br class=""></div><div class="">+1 from me.</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 8, 2018, at 4:37 PM, Iavor Diatchki <<a href="mailto:iavor.diatchki@gmail.com" class="">iavor.diatchki@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Seems reasonable to me.</div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, May 8, 2018 at 9:17 AM Simon Marlow <<a href="mailto:marlowsd@gmail.com" class="">marlowsd@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><span class="m_-9045029349262640953gmail-il">UnliftedArray</span># has been proposed by Andrew Martin:<br class="">
<a href="https://github.com/ghc-proposals/ghc-proposals/pull/112" rel="noreferrer" target="_blank" class="">https://github.com/ghc-proposals/ghc-proposals/pull/112</a><br class=""><br class=""></div>In a nutshell, the proposal is to add new primitive types UnliftedArray# and MutableUnliftedArray#<br class=""><br class="">data UnliftedArray# :: TYPE 'UnliftedRep -> TYPE 'UnliftedRep<br class="">data MutableUnliftedArray# :: TYPE 'LiftedRep -> TYPE 'UnliftedRep -> TYPE 'UnliftedRep<br class=""><br class=""></div>with the appropriate set of primops, e.g.<br class=""><br class="">indexUnliftedArray# :: forall (a :: TYPE 'UnliftedRep). UnliftedArray# a -> Int# -> a<br class=""><br class=""></div>This makes complete sense and it is what we would have done from the start, except that we only recently gained the ability to talk about type variables that range over unlifted types.<br class=""><br class=""></div>UnliftedArray# subsumes some existing rather ugly sets of primops that were added because we lacked the ability to define the more general version, like ArrayArray# And ByteArrayArray#, also including the hilarious<br class=""><br class="">indexArrayArrayArray# :: ArrayArray# -> Int# -> ArrayArray#<br class=""><br class=""></div>All of this can be defined in terms of the general UnliftedArray#. (the migration will be easier if we can use UnliftedNewtypes to define ArrayArray# in terms of UnliftedArray#, otherwise we have to keep the original versions in the compiler, but I don't think the exact mechanism matters all that much for the purposes of accepting or rejecting the proposal).<br class=""><br class=""></div><div class="">Incidentally we might also want UnliftedMutVar#, UnliftedMVar#, UnliftedTVar#, and maybe UnliftedStablePtr# but that's for another proposal.<br class=""></div><div class=""><br class=""></div>I propose that we accept this. Any objections?<br class=""><br class=""></div>Cheers<br class=""></div>Simon<br class=""></div>
_______________________________________________<br class="">
ghc-steering-committee mailing list<br class="">
<a href="mailto:ghc-steering-committee@haskell.org" target="_blank" class="">ghc-steering-committee@haskell.org</a><br class="">
<a href="https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee" rel="noreferrer" target="_blank" class="">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee</a><br class="">
</blockquote></div>
_______________________________________________<br class="">ghc-steering-committee mailing list<br class=""><a href="mailto:ghc-steering-committee@haskell.org" class="">ghc-steering-committee@haskell.org</a><br class="">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee<br class=""></div></blockquote></div><br class=""></div></body></html>