Computing lenses generically using generics-sop