@@ -180,12 +180,13 @@ type family IsElem endpoint api :: Constraint where
180180 IsElem e e = ()
181181 IsElem e a = IsElem' e a
182182
183−
184183type family IsSubList a b :: Constraint where
185184 IsSubList '[] b = ()
186− IsSubList '[x] (x ': xs) = ()
187− IsSubList '[x] (y ': ys) = IsSubList '[x] ys
188− IsSubList (x ': xs) y = IsSubList '[x] y `And` IsSubList xs y
185+ IsSubList (x ': xs) y = Elem x y `And` IsSubList xs y
186+
187+type family Elem e es :: Constraint where
188+ Elem x (x ': xs) = ()
189+ Elem y (x ': xs) = Elem y xs
189190
190191-- Phantom types for Param
191192data Query