Remove unused imports (with newer protolude)

The changes here are from fixing stack build with LTS 15.8 (GHC 8.8.3)
to be warning-free. Most if not all come from the newer protolude
version, which adds some things like `unwords`.

So to make sure that we don't get unused import warnings with newer
stackage, this both raises the protolude lower bound and removes
these imports.
This commit is contained in:
Robert Vollmert
2020-04-16 11:10:24 -05:00
committed by Steve Chavez
parent f6ce93f2c8
commit 79399686db
16 changed files with 21 additions and 25 deletions
+1 -2
View File
@@ -17,8 +17,7 @@ import Data.IORef (IORef, atomicWriteIORef, newIORef,
readIORef) readIORef)
import Data.String (IsString (..)) import Data.String (IsString (..))
import Data.Text (pack, replace, strip, stripPrefix) import Data.Text (pack, replace, strip, stripPrefix)
import Data.Text.Encoding (decodeUtf8, encodeUtf8) import Data.Text.IO (hPutStrLn)
import Data.Text.IO (hPutStrLn, readFile)
import Data.Time.Clock (getCurrentTime) import Data.Time.Clock (getCurrentTime)
import Network.Wai.Handler.Warp (defaultSettings, runSettings, import Network.Wai.Handler.Warp (defaultSettings, runSettings,
setHost, setPort, setServerName) setHost, setPort, setServerName)
+4 -4
View File
@@ -72,7 +72,7 @@ library
, network-uri >= 2.6.1 && < 2.7 , network-uri >= 2.6.1 && < 2.7
, optparse-applicative >= 0.13 && < 0.16 , optparse-applicative >= 0.13 && < 0.16
, parsec >= 3.1.11 && < 3.2 , parsec >= 3.1.11 && < 3.2
, protolude >= 0.2.2 && < 0.3 , protolude >= 0.2.4 && < 0.3
, regex-tdfa >= 1.2.2 && < 1.4 , regex-tdfa >= 1.2.2 && < 1.4
, scientific >= 0.3.4 && < 0.4 , scientific >= 0.3.4 && < 0.4
, swagger2 >= 2.4 && < 2.6 , swagger2 >= 2.4 && < 2.6
@@ -103,7 +103,7 @@ executable postgrest
, hasql-transaction >= 0.7.2 && < 1.1 , hasql-transaction >= 0.7.2 && < 1.1
, network < 3.2 , network < 3.2
, postgrest , postgrest
, protolude >= 0.2.2 && < 0.3 , protolude >= 0.2.4 && < 0.3
, retry >= 0.7.4 && < 0.9 , retry >= 0.7.4 && < 0.9
, text >= 1.2.2 && < 1.3 , text >= 1.2.2 && < 1.3
, time >= 1.6 && < 1.10 , time >= 1.6 && < 1.10
@@ -178,7 +178,7 @@ test-suite spec
, monad-control >= 1.0.1 && < 1.1 , monad-control >= 1.0.1 && < 1.1
, postgrest , postgrest
, process >= 1.4.2 && < 1.7 , process >= 1.4.2 && < 1.7
, protolude >= 0.2.2 && < 0.3 , protolude >= 0.2.4 && < 0.3
, regex-tdfa >= 1.2.2 && < 1.4 , regex-tdfa >= 1.2.2 && < 1.4
, text >= 1.2.2 && < 1.3 , text >= 1.2.2 && < 1.3
, time >= 1.6 && < 1.10 , time >= 1.6 && < 1.10
@@ -222,7 +222,7 @@ Test-Suite spec-querycost
, monad-control >= 1.0.1 && < 1.1 , monad-control >= 1.0.1 && < 1.1
, postgrest , postgrest
, process >= 1.4.2 && < 1.7 , process >= 1.4.2 && < 1.7
, protolude >= 0.2.2 && < 0.3 , protolude >= 0.2.4 && < 0.3
, regex-tdfa >= 1.2.2 && < 1.4 , regex-tdfa >= 1.2.2 && < 1.4
, text >= 1.2.2 && < 1.3 , text >= 1.2.2 && < 1.3
, time >= 1.6 && < 1.10 , time >= 1.6 && < 1.10
+2 -2
View File
@@ -28,8 +28,8 @@ import qualified Data.Vector as V
import Control.Arrow ((***)) import Control.Arrow ((***))
import Data.Aeson.Types (emptyArray, emptyObject) import Data.Aeson.Types (emptyArray, emptyObject)
import Data.List (elem, last, lookup, partition) import Data.List (last, lookup, partition)
import Data.List.NonEmpty (NonEmpty, head) import Data.List.NonEmpty (head)
import Data.Maybe (fromJust) import Data.Maybe (fromJust)
import Data.Ranged.Ranges (Range (..), emptyRange, import Data.Ranged.Ranges (Range (..), emptyRange,
rangeIntersection) rangeIntersection)
-1
View File
@@ -40,7 +40,6 @@ import Network.HTTP.Types.Status
import Network.Wai import Network.Wai
import PostgREST.ApiRequest (Action (..), ApiRequest (..), import PostgREST.ApiRequest (Action (..), ApiRequest (..),
ContentType (..),
InvokeMethod (..), Target (..), InvokeMethod (..), Target (..),
mutuallyAgreeable, userApiRequest) mutuallyAgreeable, userApiRequest)
import PostgREST.Auth (containsRole, jwtClaims, import PostgREST.Auth (containsRole, jwtClaims,
+3 -4
View File
@@ -37,12 +37,11 @@ import Control.Lens (preview)
import Control.Monad (fail) import Control.Monad (fail)
import Crypto.JWT (StringOrURI, stringOrUri) import Crypto.JWT (StringOrURI, stringOrUri)
import Data.List (lookup) import Data.List (lookup)
import Data.List.NonEmpty (NonEmpty, fromList) import Data.List.NonEmpty (fromList)
import Data.Scientific (floatingOrInteger) import Data.Scientific (floatingOrInteger)
import Data.Text (dropEnd, dropWhileEnd, import Data.Text (dropEnd, dropWhileEnd,
intercalate, lines, splitOn, intercalate, splitOn, strip, take,
strip, take, unpack) unpack)
import Data.Text.Encoding (encodeUtf8)
import Data.Text.IO (hPutStrLn) import Data.Text.IO (hPutStrLn)
import Data.Version (versionBranch) import Data.Version (versionBranch)
import Development.GitRev (gitHash) import Development.GitRev (gitHash)
-1
View File
@@ -23,7 +23,6 @@ import qualified Network.HTTP.Types.Status as HT
import Data.Aeson ((.=)) import Data.Aeson ((.=))
import Network.Wai (Response, responseLBS) import Network.Wai (Response, responseLBS)
import Text.Read (readMaybe)
import Network.HTTP.Types.Header import Network.HTTP.Types.Header
-2
View File
@@ -9,10 +9,8 @@ module PostgREST.Parsers where
import qualified Data.HashMap.Strict as M import qualified Data.HashMap.Strict as M
import qualified Data.Set as S import qualified Data.Set as S
import Control.Monad ((>>))
import Data.Either.Combinators (mapLeft) import Data.Either.Combinators (mapLeft)
import Data.Foldable (foldl1) import Data.Foldable (foldl1)
import Data.Functor (($>))
import Data.List (init, last) import Data.List (init, last)
import Data.Text (intercalate, replace, strip) import Data.Text (intercalate, replace, strip)
import Text.Read (read) import Text.Read (read)
+1 -1
View File
@@ -11,7 +11,7 @@ import qualified Data.HashMap.Strict as HM
import Data.Maybe import Data.Maybe
import Data.Text (intercalate, import Data.Text (intercalate,
isInfixOf, replace, isInfixOf, replace,
toLower, unwords) toLower)
import qualified Data.Text as T (map, null, import qualified Data.Text as T (map, null,
takeWhile) takeWhile)
import PostgREST.Types import PostgREST.Types
+1 -1
View File
@@ -22,7 +22,7 @@ module PostgREST.QueryBuilder (
import qualified Data.Set as S import qualified Data.Set as S
import Data.Text (intercalate, unwords) import Data.Text (intercalate)
import Data.Tree (Tree (..)) import Data.Tree (Tree (..))
import Data.Maybe import Data.Maybe
-2
View File
@@ -22,8 +22,6 @@ import Data.Aeson as JSON
import qualified Data.Aeson.Lens as L import qualified Data.Aeson.Lens as L
import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Char8 as BS
import Data.Maybe import Data.Maybe
import Data.Text (unwords)
import Data.Text.Encoding (encodeUtf8)
import qualified Hasql.Decoders as HD import qualified Hasql.Decoders as HD
import qualified Hasql.Encoders as HE import qualified Hasql.Encoders as HE
import qualified Hasql.Statement as H import qualified Hasql.Statement as H
+1
View File
@@ -18,3 +18,4 @@ extra-deps:
- configurator-pg-0.2.0@sha256:08dcfadbe31e9e505d0bed1ab034105e1735141499734ad52d1c5ac980cde4a6,2939 - configurator-pg-0.2.0@sha256:08dcfadbe31e9e505d0bed1ab034105e1735141499734ad52d1c5ac980cde4a6,2939
- hspec-wai-0.10.1@sha256:56dd9ec1d56f47ef1946f71f7cbf070e4c285f718cac1b158400ae5e7172ef47,2290 - hspec-wai-0.10.1@sha256:56dd9ec1d56f47ef1946f71f7cbf070e4c285f718cac1b158400ae5e7172ef47,2290
- hspec-wai-json-0.10.1@sha256:67b405c38f0a9e2771480c8d3ecd8aeb8d8776a35d3b2906cb1b76c9538617e4,1629 - hspec-wai-json-0.10.1@sha256:67b405c38f0a9e2771480c8d3ecd8aeb8d8776a35d3b2906cb1b76c9538617e4,1629
- protolude-0.2.4@sha256:8bcf18da79be0832fccdd4cd5770e20baa4caec61c141d7119632a830b4096a9,2191
+7
View File
@@ -39,6 +39,13 @@ packages:
sha256: fb9e89b79cde3276baa484c860c6b9eeebdbc1a5c43301293351a25bc4c08e87 sha256: fb9e89b79cde3276baa484c860c6b9eeebdbc1a5c43301293351a25bc4c08e87
original: original:
hackage: hspec-wai-json-0.10.1@sha256:67b405c38f0a9e2771480c8d3ecd8aeb8d8776a35d3b2906cb1b76c9538617e4,1629 hackage: hspec-wai-json-0.10.1@sha256:67b405c38f0a9e2771480c8d3ecd8aeb8d8776a35d3b2906cb1b76c9538617e4,1629
- completed:
hackage: protolude-0.2.4@sha256:8bcf18da79be0832fccdd4cd5770e20baa4caec61c141d7119632a830b4096a9,2191
pantry-tree:
size: 1438
sha256: 9d8560e5514bac03fa00a37195d683ee628169a502c263b8d94588bfeb0ba097
original:
hackage: protolude-0.2.4@sha256:8bcf18da79be0832fccdd4cd5770e20baa4caec61c141d7119632a830b4096a9,2191
snapshots: snapshots:
- completed: - completed:
size: 523878 size: 523878
-1
View File
@@ -5,7 +5,6 @@
module Feature.ConcurrentSpec where module Feature.ConcurrentSpec where
import Control.Concurrent.Async (mapConcurrently) import Control.Concurrent.Async (mapConcurrently)
import Control.Monad (void)
import Network.Wai (Application) import Network.Wai (Application)
import Control.Monad.Base import Control.Monad.Base
-1
View File
@@ -2,7 +2,6 @@ module Feature.InsertSpec where
import qualified Data.Aeson as JSON import qualified Data.Aeson as JSON
import Control.Monad (replicateM_, void)
import Data.List (lookup) import Data.List (lookup)
import Data.Maybe (fromJust) import Data.Maybe (fromJust)
import Network.Wai (Application) import Network.Wai (Application)
+1 -2
View File
@@ -1,7 +1,6 @@
module Feature.UnicodeSpec where module Feature.UnicodeSpec where
import Control.Monad (void) import Network.Wai (Application)
import Network.Wai (Application)
import Test.Hspec import Test.Hspec
import Test.Hspec.Wai import Test.Hspec.Wai
-1
View File
@@ -7,7 +7,6 @@ import qualified Data.Map.Strict as M
import qualified Data.Set as S import qualified Data.Set as S
import qualified System.IO.Error as E import qualified System.IO.Error as E
import Control.Monad (void)
import Data.Aeson (Value (..), decode, encode) import Data.Aeson (Value (..), decode, encode)
import Data.CaseInsensitive (CI (..)) import Data.CaseInsensitive (CI (..))
import Data.List (lookup) import Data.List (lookup)