git.iko.soy/typeable/openapi3
on master help sign in
Relax lower version bounds for some packages
commitb2f1e40ee341e6f441f956160dfa7475b9786dc9 authorUladzimir Stsepchanka <st.uladzimir@protonmail.com> dateMon 9 Nov 2020, 13:57 (6 years ago) parent9ea13c6
2 files changed+32−7
openapi3.cabal+4−4 src/Data/OpenApi/Internal/AesonUtils.hs+28−3
openapi3.cabal+4−4
@@ -66,18 +66,18 @@ library
6666
6767 build-depends:
6868 mtl >=2.2.2 && <2.3
69− , text >=1.2.3.1 && <1.3
69+ , text >=1.2.3.0 && <1.3
7070
7171 -- other dependencies
7272 build-depends:
73− base-compat-batteries >=0.11.1 && <0.12
73+ base-compat-batteries >=0.10.5 && <0.12
7474 , aeson >=1.4.2.0 && <1.6
7575 , aeson-pretty >=0.8.7 && <0.9
7676 -- cookie 0.4.3 is needed by GHC 7.8 due to time>=1.4 constraint
7777 , cookie >=0.4.3 && <0.5
78− , generics-sop >=0.5.1.0 && <0.6
78+ , generics-sop >=0.4.0.1 && <0.6
7979 , hashable >=1.2.7.0 && <1.4
80− , http-media >=0.8.0.0 && <0.9
80+ , http-media >=0.7.1.3 && <0.9
8181 , insert-ordered-containers >=0.2.3 && <0.3
8282 , lens >=4.16.1 && <4.20
8383 , network >=2.6.3.5 && <3.2
src/Data/OpenApi/Internal/AesonUtils.hs+28−3
@@ -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