@@ -1,3 +1,4 @@
1{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE FlexibleContexts #-}
3{-# LANGUAGE FlexibleContexts #-}
3{-# LANGUAGE GADTs #-}
4{-# LANGUAGE GADTs #-}
@@ -138,7 +139,15 @@ sopSwaggerGenericToJSON'
138 -> DatatypeInfo '[xs]
139 -> DatatypeInfo '[xs]
139 -> POP Maybe '[xs]
140 -> POP Maybe '[xs]
140 -> [Pair]
141 -> [Pair]
142+sopSwaggerGenericToJSON'
145+#if MIN_VERSION_generics_sop(0,5,0)
141−sopSwaggerGenericToJSON' opts (SOP (Z fields)) (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
146+ (ADT _ _ (Record _ fieldsInfo :* Nil) _)
148+ (ADT _ _ (Record _ fieldsInfo :* Nil))
150+ (POP (defs :* Nil)) =
142 sopSwaggerGenericToJSON'' opts fields fieldsInfo defs
151 sopSwaggerGenericToJSON'' opts fields fieldsInfo defs
143sopSwaggerGenericToJSON' _ _ _ _ = error "sopSwaggerGenericToJSON: unsupported type"
152sopSwaggerGenericToJSON' _ _ _ _ = error "sopSwaggerGenericToJSON: unsupported type"
@@ -211,7 +220,15 @@ sopSwaggerGenericParseJSON'
211 -> DatatypeInfo '[xs]
220 -> DatatypeInfo '[xs]
212 -> POP Maybe '[xs]
221 -> POP Maybe '[xs]
213 -> Parser (SOP I '[xs])
222 -> Parser (SOP I '[xs])
214−sopSwaggerGenericParseJSON' opts obj (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
223+sopSwaggerGenericParseJSON'
226+#if MIN_VERSION_generics_sop(0,5,0)
227+ (ADT _ _ (Record _ fieldsInfo :* Nil) _)
229+ (ADT _ _ (Record _ fieldsInfo :* Nil))
231+ (POP (defs :* Nil)) =
215 SOP . Z <$> sopSwaggerGenericParseJSON'' opts obj fieldsInfo defs
232 SOP . Z <$> sopSwaggerGenericParseJSON'' opts obj fieldsInfo defs
216sopSwaggerGenericParseJSON' _ _ _ _ = error "sopSwaggerGenericParseJSON: unsupported type"
233sopSwaggerGenericParseJSON' _ _ _ _ = error "sopSwaggerGenericParseJSON: unsupported type"
@@ -278,7 +295,15 @@ sopSwaggerGenericToEncoding'
278 -> DatatypeInfo '[xs]
295 -> DatatypeInfo '[xs]
279 -> POP Maybe '[xs]
296 -> POP Maybe '[xs]
280 -> Series
297 -> Series
281−sopSwaggerGenericToEncoding' opts (SOP (Z fields)) (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
298+sopSwaggerGenericToEncoding'
301+#if MIN_VERSION_generics_sop(0,5,0)
302+ (ADT _ _ (Record _ fieldsInfo :* Nil) _)
304+ (ADT _ _ (Record _ fieldsInfo :* Nil))
306+ (POP (defs :* Nil)) =
282 sopSwaggerGenericToEncoding'' opts fields fieldsInfo defs
307 sopSwaggerGenericToEncoding'' opts fields fieldsInfo defs
283sopSwaggerGenericToEncoding' _ _ _ _ = error "sopSwaggerGenericToEncoding: unsupported type"
308sopSwaggerGenericToEncoding' _ _ _ _ = error "sopSwaggerGenericToEncoding: unsupported type"