@@ -1,3 +1,4 @@
1{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE FlexibleContexts #-}
3{-# LANGUAGE FlexibleContexts #-}
3{-# LANGUAGE GADTs #-}
4{-# LANGUAGE GADTs #-}
@@ -137,7 +138,15 @@ sopSwaggerGenericToJSON'
137 -> DatatypeInfo '[xs]
138 -> DatatypeInfo '[xs]
138 -> POP Maybe '[xs]
139 -> POP Maybe '[xs]
139 -> [Pair]
140 -> [Pair]
141+sopSwaggerGenericToJSON'
144+#if MIN_VERSION_generics_sop(0,5,0)
140−sopSwaggerGenericToJSON' opts (SOP (Z fields)) (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
145+ (ADT _ _ (Record _ fieldsInfo :* Nil) _)
147+ (ADT _ _ (Record _ fieldsInfo :* Nil))
149+ (POP (defs :* Nil)) =
141 sopSwaggerGenericToJSON'' opts fields fieldsInfo defs
150 sopSwaggerGenericToJSON'' opts fields fieldsInfo defs
142sopSwaggerGenericToJSON' _ _ _ _ = error "sopSwaggerGenericToJSON: unsupported type"
151sopSwaggerGenericToJSON' _ _ _ _ = error "sopSwaggerGenericToJSON: unsupported type"
@@ -210,7 +219,15 @@ sopSwaggerGenericParseJSON'
210 -> DatatypeInfo '[xs]
219 -> DatatypeInfo '[xs]
211 -> POP Maybe '[xs]
220 -> POP Maybe '[xs]
212 -> Parser (SOP I '[xs])
221 -> Parser (SOP I '[xs])
213−sopSwaggerGenericParseJSON' opts obj (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
222+sopSwaggerGenericParseJSON'
225+#if MIN_VERSION_generics_sop(0,5,0)
226+ (ADT _ _ (Record _ fieldsInfo :* Nil) _)
228+ (ADT _ _ (Record _ fieldsInfo :* Nil))
230+ (POP (defs :* Nil)) =
214 SOP . Z <$> sopSwaggerGenericParseJSON'' opts obj fieldsInfo defs
231 SOP . Z <$> sopSwaggerGenericParseJSON'' opts obj fieldsInfo defs
215sopSwaggerGenericParseJSON' _ _ _ _ = error "sopSwaggerGenericParseJSON: unsupported type"
232sopSwaggerGenericParseJSON' _ _ _ _ = error "sopSwaggerGenericParseJSON: unsupported type"
@@ -277,7 +294,15 @@ sopSwaggerGenericToEncoding'
277 -> DatatypeInfo '[xs]
294 -> DatatypeInfo '[xs]
278 -> POP Maybe '[xs]
295 -> POP Maybe '[xs]
279 -> Series
296 -> Series
280−sopSwaggerGenericToEncoding' opts (SOP (Z fields)) (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
297+sopSwaggerGenericToEncoding'
300+#if MIN_VERSION_generics_sop(0,5,0)
301+ (ADT _ _ (Record _ fieldsInfo :* Nil) _)
303+ (ADT _ _ (Record _ fieldsInfo :* Nil))
305+ (POP (defs :* Nil)) =
281 sopSwaggerGenericToEncoding'' opts fields fieldsInfo defs
306 sopSwaggerGenericToEncoding'' opts fields fieldsInfo defs
282sopSwaggerGenericToEncoding' _ _ _ _ = error "sopSwaggerGenericToEncoding: unsupported type"
307sopSwaggerGenericToEncoding' _ _ _ _ = error "sopSwaggerGenericToEncoding: unsupported type"