@@ -112,16 +112,22 @@ instance
112112 position' f s = VL.ravel (repLens . coerced @cs @cs . glens @(HasTotalPositionPSym i)) f s
113113 {-# INLINE position' #-}
114114
115+-- this is to 'hide' the equality constraints which interfere with inlining
116+-- pre 8.4.3
117+class (~~) a b | a -> b, b -> a
118+instance (a ~ b) => (~~) a b
119+
115120instance -- see Note [Changing type parameters]
116121 ( Generic s
117122 , Generic t
118123 , ErrorUnless i s (0 <? i && i <=? Size (Rep s))
119124 , GLens (HasTotalPositionPSym i) (CRep s) (CRep t) a b
120− , HasTotalPositionP i (CRep s) ~ 'Just a
121− , HasTotalPositionP i (CRep (Indexed s)) ~ 'Just a'
122− , HasTotalPositionP i (CRep (Indexed t)) ~ 'Just b'
123− , t ~ Infer s a' b
124− , s ~ Infer t b' a
125+ , HasTotalPositionP i (CRep s) ~~ 'Just a
126+ , HasTotalPositionP i (CRep t) ~~ 'Just b
127+ , HasTotalPositionP i (CRep (Indexed s)) ~~ 'Just a'
128+ , HasTotalPositionP i (CRep (Indexed t)) ~~ 'Just b'
129+ , t ~~ Infer s a' b
130+ , s ~~ Infer t b' a
125131 , Coercible (CRep s) (Rep s)
126132 , Coercible (CRep t) (Rep t)
127133 ) => HasPosition i s t a b where