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

Richard Eisenberg rae at richarde.dev
Thu Mar 14 19:29:46 UTC 2019



> On Mar 7, 2019, at 10:27 PM, Eric Seidel <eric at seidel.io <mailto: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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20190314/2b92e9d5/attachment.html>


More information about the ghc-steering-committee mailing list