@@ -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