git.iko.soy/typeable/swagger2
on master help sign in
(squash-me) support GHC 7.x
commit9d0865b0faf5b694fb7915c3a072669e9da03624 authorLucas DiCioccio <ldicioccio@vente-privee.com> dateThu 9 Nov 2017, 09:42 (9 years ago) parent4fcb678
2 files changed+3−4
src/Data/Swagger/Internal/Schema.hs+1−4 swagger2.cabal+2
src/Data/Swagger/Internal/Schema.hs+1−4
@@ -44,6 +44,7 @@ import qualified Data.HashMap.Strict.InsOrd as InsOrdHashMap
4444import Data.Int
4545import Data.IntSet (IntSet)
4646import Data.IntMap (IntMap)
47+import Data.List.NonEmpty (NonEmpty)
4748import Data.Map (Map)
4849import Data.Proxy
4950import Data.Scientific (Scientific)
@@ -73,7 +74,6 @@ import Data.Swagger.Internal.TypeShape
7374#else
7475import qualified Data.ByteString as BS
7576import qualified Data.ByteString.Lazy as BSL
76−import Data.List.NonEmpty (NonEmpty)
7777import GHC.TypeLits (TypeError, ErrorMessage(..))
7878#endif
7979
@@ -562,14 +562,11 @@ instance ToSchema a => ToSchema (Set a) where
562562
563563instance ToSchema a => ToSchema (HashSet a) where declareNamedSchema _ = declareNamedSchema (Proxy :: Proxy (Set a))
564564
565−#if __GLASGOW_HASKELL__ < 800
566−#else
567565instance ToSchema a => ToSchema (NonEmpty a) where
568566 declareNamedSchema _ = do
569567 schema <- declareSchema (Proxy :: Proxy [a])
570568 return $ unnamed $ schema
571569 & minItems .~ Just 1
572−#endif
573570
574571instance ToSchema All where declareNamedSchema = plain . paramSchemaToSchema
575572instance ToSchema Any where declareNamedSchema = plain . paramSchemaToSchema
swagger2.cabal+2
@@ -71,6 +71,8 @@ library
7171 , uuid-types >=1.0.2 && <1.1
7272 if !impl(ghc >= 7.10)
7373 build-depends: nats >=1.1.1 && <1.2
74+ if !impl(ghc >= 8.0)
75+ build-depends: semigroups >= 0.18.3 && <0.19
7476 default-language: Haskell2010
7577
7678test-suite spec