
Colleagues
I propose that we accept proposal #203 on lifted-ness polymorphism.
https://github.com/andrewthad/ghc-proposals/blob/pointer_rep/proposals/0000-...
In particular, the definition of RuntimeRep changes from
data RuntimeRep
= LiftedRep
| UnliftedRep
| IntRep
| ...
to
data Levity = Lifted | Unlifted
data RuntimeRep
= PtrRep Levity
| IntRep
| ...
The goal here is to support levity *polymorphism*, with the main payoff being the ability to store both lifted and unlifted values in the same data types. So, for example
data Array# :: forall (v :: Levity). TYPE ('PtrRep v) -> Type
data MutableArray# :: forall (v :: Levity). Type -> TYPE ('PtrRep v) -> Type
This is a real win compared to having one data type for lifted and one for unlifted values. But they have the same *representation*: both are represented by a pointer.
I believe (although the proposal does not aquite say) that the proposal fully subsumes the earlier (accepted) proposal for unlifted arrays
https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0021-un...
So that's good!
This proposal seems like a pretty clear win. The only downside is (as so often) that the full types of data types and functions gets a bit more complicated. But we've already accepted that with the levity polymorphism stuff we already have.
Silence = assent 😊
Simon
| -----Original Message-----
| From: ghc-steering-committee