[ghc-steering-committee] Proposal #209: Levity polymorphic lift. Recommendation: accept

Eric Seidel eric at seidel.io
Sat Mar 16 14:40:28 UTC 2019


Too bad. It sounds like we agree then that removing the default implementation is the best option we have. I've proposed that on GitHub and will approve the modified proposal assuming there aren't any last objections.

On Thu, Mar 14, 2019, at 15:29, Richard Eisenberg wrote:
> 
> 
> > On Mar 7, 2019, at 10:27 PM, Eric Seidel <eric at seidel.io> wrote:
> > 
> > I imagine we could get away with
> > 
> > default liftTyped :: (r ~ 'LiftedRep, Data t) => t -> Q (TExp t)
> > liftTyped = unsafeTExpCoerce . liftData
> 
> Sadly, this won't work. GHC just isn't clever enough. The problem is 
> that, for (Data t) to be well-typed, we need (r ~ LiftedRep). This 
> means that the typedness of one constraint depends on another. The 
> internal language can do this fine, but type inference isn't up to the 
> challenge. We'll get there some day. But I think this way is a dead-end 
> for now.
> 
> So it sounds (to me) that the best way forward is to remove the default 
> implementation of liftTyped altogether....
> 
> Richard


More information about the ghc-steering-committee mailing list