summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/Handlers.hs3
-rw-r--r--server/HtmlOrphans.hs44
-rw-r--r--server/Main.hs18
-rw-r--r--server/Server.hs5
-rw-r--r--server/Worker.hs3
5 files changed, 39 insertions, 34 deletions
diff --git a/server/Handlers.hs b/server/Handlers.hs
index 10a729c..89ec6fe 100644
--- a/server/Handlers.hs
+++ b/server/Handlers.hs
@@ -12,7 +12,7 @@ module Handlers (
, AdminOverview(..)
, MapService(..),relintImpl,realtimeImpl) where
-import Universum
+import Universum hiding (view)
import CheckDir (DirResult (dirresultMaps))
import CheckMap (MapResult (..))
@@ -23,6 +23,7 @@ import qualified Data.Aeson as A
import qualified Data.Aeson.Key as A
import Data.Coerce (coerce)
import qualified Data.Map as M
+import Lens.Micro.Platform (view)
import Network.WebSockets (PendingConnection, acceptRequest,
rejectRequest, sendTextData,
withPingThread)
diff --git a/server/HtmlOrphans.hs b/server/HtmlOrphans.hs
index a8a355c..783c7c6 100644
--- a/server/HtmlOrphans.hs
+++ b/server/HtmlOrphans.hs
@@ -12,27 +12,29 @@
-- linter results as html
module HtmlOrphans () where
-import Universum
-
-import CheckDir (DirResult (..), MissingAsset (MissingAsset),
- MissingDep (..), maximumLintLevel)
-import CheckMap (MapResult (..))
-import Data.List.Extra (escapeJSON)
-import qualified Data.Map as M
-import qualified Data.Text as T
-import Handlers (AdminOverview (..))
-import Lucid (HtmlT, ToHtml)
-import Lucid.Base (ToHtml (toHtml))
-import Lucid.Html5 (a_, body_, button_, class_, code_, disabled_,
- div_, em_, h1_, h2_, h3_, h4_, head_, href_,
- html_, id_, li_, link_, main_, onclick_, p_,
- rel_, script_, span_, src_, title_, type_,
- ul_)
-import Server (JobStatus (..),
- Org (Org, orgBacklinkPrefix, orgContactMail, orgHowtoLink, orgSlug),
- RemoteRef (RemoteRef, reponame, reporef, repourl),
- prettySha, unState)
-import Types (Hint (Hint), Level (..))
+import Universum hiding (view)
+
+import CheckDir (DirResult (..),
+ MissingAsset (MissingAsset),
+ MissingDep (..), maximumLintLevel)
+import CheckMap (MapResult (..))
+import Data.List.Extra (escapeJSON)
+import qualified Data.Map as M
+import qualified Data.Text as T
+import Handlers (AdminOverview (..))
+import Lens.Micro.Platform (view)
+import Lucid (HtmlT, ToHtml)
+import Lucid.Base (ToHtml (toHtml))
+import Lucid.Html5 (a_, body_, button_, class_, code_,
+ disabled_, div_, em_, h1_, h2_, h3_, h4_,
+ head_, href_, html_, id_, li_, link_,
+ main_, onclick_, p_, rel_, script_, span_,
+ src_, title_, type_, ul_)
+import Server (JobStatus (..),
+ Org (Org, orgBacklinkPrefix, orgContactMail, orgHowtoLink, orgSlug),
+ RemoteRef (RemoteRef, reponame, reporef, repourl),
+ prettySha, unState)
+import Types (Hint (Hint), Level (..))
import Fmt
diff --git a/server/Main.hs b/server/Main.hs
index 6431b3f..d082df7 100644
--- a/server/Main.hs
+++ b/server/Main.hs
@@ -7,12 +7,14 @@
-- | simple server offering linting "as a service"
module Main where
-import Universum
+import Universum hiding (view)
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async (async, link, waitEither_)
import Control.Concurrent.STM.TQueue (TQueue, newTQueueIO,
writeTQueue)
+import Control.Monad.Logger (logInfoN,
+ runStdoutLoggingT)
import qualified Data.Text as T
import Fmt ((+|), (|+))
import Handlers (AdminOverview (AdminOverview),
@@ -20,6 +22,7 @@ import Handlers (AdminOverview (AdminOverv
realtimeImpl, relintImpl,
stateImpl, statusImpl)
import HtmlOrphans ()
+import Lens.Micro.Platform (view)
import Network.HTTP.Client (defaultManagerSettings,
newManager)
import Network.Wai.Handler.Warp (defaultSettings,
@@ -34,6 +37,10 @@ import Servant (Application, Capture,
Server, serve,
type (:<|>) (..),
type (:>))
+import Servant.API (Header)
+import Servant.API.WebSocket (WebSocketPending)
+import Servant.Client (ClientM, client,
+ mkClientEnv, runClientM)
import Servant.HTML.Lucid (HTML)
import Servant.Server.StaticFiles (serveDirectoryWebApp)
import Server (CliOptions (..),
@@ -43,15 +50,8 @@ import Server (CliOptions (..),
exneuland, interval,
loadConfig, orgs, port,
token, verbose)
-import Worker (Job (Job), linterThread)
-
-import Control.Monad.Logger (logInfoN,
- runStdoutLoggingT)
-import Servant.API (Header)
-import Servant.API.WebSocket (WebSocketPending)
-import Servant.Client (ClientM, client,
- mkClientEnv, runClientM)
import WithCli (withCli)
+import Worker (Job (Job), linterThread)
type family PolyEndpoint method format payload where
PolyEndpoint Get format payload =
diff --git a/server/Server.hs b/server/Server.hs
index 059078b..85e6ae5 100644
--- a/server/Server.hs
+++ b/server/Server.hs
@@ -21,7 +21,7 @@ module Server ( loadConfig
, prettySha,getJobStatus,overJobStatus
, adjustedPath,RealtimeMsg(..),newRealtimeChannel,adjustedWebPath) where
-import Universum
+import Universum hiding (_2, view, (%~))
import CheckDir (DirResult)
import CheckMap (ResultKind (Shrunk))
@@ -37,7 +37,8 @@ import Data.Coerce (coerce)
import Data.Either.Extra (mapLeft)
import Data.Functor.Contravariant (contramap)
import qualified Data.Map.Strict as M
-import Lens.Micro.Platform (at, ix, makeLenses, traverseOf)
+import Lens.Micro.Platform (_2, at, ix, makeLenses,
+ traverseOf, view, (%~))
import LintConfig (ConfigKind (..), LintConfig,
feedConfig)
import Servant (FromHttpApiData)
diff --git a/server/Worker.hs b/server/Worker.hs
index 2aa74e0..a580f4a 100644
--- a/server/Worker.hs
+++ b/server/Worker.hs
@@ -7,7 +7,7 @@
module Worker (linterThread, Job(..)) where
-import Universum
+import Universum hiding (view)
import CheckDir (recursiveCheckDir,
resultIsFatal, shrinkDirResult)
@@ -21,6 +21,7 @@ import qualified Data.Text as T
import qualified Data.UUID as UUID
import qualified Data.UUID.V4 as UUID
import Fmt ((+|), (|+))
+import Lens.Micro.Platform (view)
import LintConfig (stuffConfig)
import Server (Config, JobStatus (..),
Org (..),