<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><blockquote type="cite" style="font-family: Menlo-Regular; font-size: 11px;" class="">On Mar 7, 2019, at 10:27 PM, Eric Seidel <<a href="mailto:eric@seidel.io" class="">eric@seidel.io</a>> wrote:<br class=""><br class="">I imagine we could get away with<br class=""><br class="">default liftTyped :: (r ~ 'LiftedRep, Data t) => t -> Q (TExp t)<br class="">liftTyped = unsafeTExpCoerce . liftData<br class=""></blockquote><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><span style="font-family: Menlo-Regular; font-size: 11px;" class="">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.</span><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><span style="font-family: Menlo-Regular; font-size: 11px;" class="">So it sounds (to me) that the best way forward is to remove the default implementation of liftTyped altogether....</span><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><span style="font-family: Menlo-Regular; font-size: 11px;" class="">Richard</span></body></html>