On Mar 7, 2019, at 10:27 PM, Eric Seidel <eric@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