logo       

TH: missing instance of Lift for pairs/tuples: msg#00075

lang.haskell.glasgow.bugs

Subject: TH: missing instance of Lift for pairs/tuples

There do not seem to be Lift instance declarations for tuples:

:t lift (3::Int,4::Int)
No instance for (Lift (Int, Int))
arising from use of `lift' at <No locn>

They are easy to add (up to a fixed size)

instance (Lift a, Lift b) => Lift (a,b)
lift (a,b) = tupE [lift a, lift b]

It would be nice if this were in the TH.Syntax module.

Duncan


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise