@@ -1,4 +1,5 @@
11{-# LANGUAGE AllowAmbiguousTypes #-}
2+{-# LANGUAGE CPP #-}
23{-# LANGUAGE ConstraintKinds #-}
34{-# LANGUAGE DataKinds #-}
45{-# LANGUAGE FlexibleInstances #-}
@@ -127,15 +128,20 @@ instance -- see Note [Changing type parameters]
127128 ( Generic s
128129 , ErrorUnless field s (CollectField field (Rep s))
129130 , Generic t
131+ -- see Note [CPP in instance constraints]
132+#if __GLASGOW_HASKELL__ < 802
133+ , '(s', t') ~ '(Proxied s, Proxied t)
134+#else
130135 , s' ~ Proxied s
131136 , t' ~ Proxied t
137+#endif
132138 , Generic s'
133139 , Generic t'
134140 , GHasField' field (Rep s) a
135141 , GHasField' field (Rep s') a'
142+ , GHasField' field (Rep t') b'
136143 , GHasField field (Rep s) (Rep t) a b
137144 , t ~ Infer s a' b
138− , GHasField' field (Rep t') b'
139145 , s ~ Infer t b' a
140146 ) => HasField field s t a b where
141147