@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12{-# LANGUAGE DataKinds #-}
23{-# LANGUAGE FlexibleContexts #-}
34{-# LANGUAGE GADTs #-}
@@ -137,7 +138,15 @@ sopSwaggerGenericToJSON'
137138 -> DatatypeInfo '[xs]
138139 -> POP Maybe '[xs]
139140 -> [Pair]
140−sopSwaggerGenericToJSON' opts (SOP (Z fields)) (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
141+sopSwaggerGenericToJSON'
142+ opts
143+ (SOP (Z fields))
144+#if MIN_VERSION_generics_sop(0,5,0)
145+ (ADT _ _ (Record _ fieldsInfo :* Nil) _)
146+#else
147+ (ADT _ _ (Record _ fieldsInfo :* Nil))
148+#endif
149+ (POP (defs :* Nil)) =
141150 sopSwaggerGenericToJSON'' opts fields fieldsInfo defs
142151sopSwaggerGenericToJSON' _ _ _ _ = error "sopSwaggerGenericToJSON: unsupported type"
143152
@@ -210,7 +219,15 @@ sopSwaggerGenericParseJSON'
210219 -> DatatypeInfo '[xs]
211220 -> POP Maybe '[xs]
212221 -> Parser (SOP I '[xs])
213−sopSwaggerGenericParseJSON' opts obj (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
222+sopSwaggerGenericParseJSON'
223+ opts
224+ obj
225+#if MIN_VERSION_generics_sop(0,5,0)
226+ (ADT _ _ (Record _ fieldsInfo :* Nil) _)
227+#else
228+ (ADT _ _ (Record _ fieldsInfo :* Nil))
229+#endif
230+ (POP (defs :* Nil)) =
214231 SOP . Z <$> sopSwaggerGenericParseJSON'' opts obj fieldsInfo defs
215232sopSwaggerGenericParseJSON' _ _ _ _ = error "sopSwaggerGenericParseJSON: unsupported type"
216233
@@ -277,7 +294,15 @@ sopSwaggerGenericToEncoding'
277294 -> DatatypeInfo '[xs]
278295 -> POP Maybe '[xs]
279296 -> Series
280−sopSwaggerGenericToEncoding' opts (SOP (Z fields)) (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
297+sopSwaggerGenericToEncoding'
298+ opts
299+ (SOP (Z fields))
300+#if MIN_VERSION_generics_sop(0,5,0)
301+ (ADT _ _ (Record _ fieldsInfo :* Nil) _)
302+#else
303+ (ADT _ _ (Record _ fieldsInfo :* Nil))
304+#endif
305+ (POP (defs :* Nil)) =
281306 sopSwaggerGenericToEncoding'' opts fields fieldsInfo defs
282307sopSwaggerGenericToEncoding' _ _ _ _ = error "sopSwaggerGenericToEncoding: unsupported type"
283308