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