<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="">+1<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Am 09.05.2018 um 02:16 schrieb Simon Marlow <<a href="mailto:marlowsd@gmail.com" class="">marlowsd@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><span class="gmail-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-<wbr class="">proposals/ghc-proposals/pull/<wbr class="">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" 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=""></body></html>