diff options
-rw-r--r-- | Alpha.hs | 1 | ||||
-rw-r--r-- | Biz/Bild.hs | 5 | ||||
-rw-r--r-- | Biz/Bild.nix | 3 | ||||
-rw-r--r-- | Biz/Bild/Deps.hs | 2 | ||||
-rw-r--r-- | Biz/Dragons.hs | 5 | ||||
-rw-r--r-- | Biz/Que/Host.hs | 2 | ||||
-rw-r--r-- | Biz/Que/Site.hs | 6 |
7 files changed, 16 insertions, 8 deletions
@@ -1,5 +1,6 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} +{-# OPTIONS_GHC -fno-warn-orphans #-} -- | Commonly useful functions, a Prelude replacement. -- diff --git a/Biz/Bild.hs b/Biz/Bild.hs index bae0328..5c8e287 100644 --- a/Biz/Bild.hs +++ b/Biz/Bild.hs @@ -612,7 +612,10 @@ analyze hmap ns = case Map.lookup ns hmap of packageSet = "haskell.packages", mainModule = Namespace.toModule namespace, compilerFlags = - [ "-Werror", + [ "-Wall", + "-Werror", + "-haddock", + "-Winvalid-haddock", "-threaded", "-i$CODEROOT", "-odir", diff --git a/Biz/Bild.nix b/Biz/Bild.nix index c6e2f27..859d070 100644 --- a/Biz/Bild.nix +++ b/Biz/Bild.nix @@ -111,6 +111,9 @@ let ghc \ -threaded \ -Werror \ + -Wall \ + -Winvalid-haddock \ + -haddock \ -i. \ --make Biz/Bild.hs \ -main-is Biz.Bild \ diff --git a/Biz/Bild/Deps.hs b/Biz/Bild/Deps.hs index 0b57a4f..2b2a72a 100644 --- a/Biz/Bild/Deps.hs +++ b/Biz/Bild/Deps.hs @@ -69,7 +69,7 @@ cli args = do execParserPure' pprefs pinfo [] = Opts.Failure <| Opts.parserFailure pprefs pinfo (Opts.ShowHelpText Nothing) mempty - execParserPure' pprefs pinfo args = Opts.execParserPure pprefs pinfo args + execParserPure' pprefs pinfo args_ = Opts.execParserPure pprefs pinfo args_ opts = Opts.info ((,) </ ((,) </ parseFindSourcesJson <*> parseColors) <*> (parseCommand <**> Opts.helper)) <| mconcat desc desc = [ Opts.fullDesc, diff --git a/Biz/Dragons.hs b/Biz/Dragons.hs index 7e626da..4497f8e 100644 --- a/Biz/Dragons.hs +++ b/Biz/Dragons.hs @@ -77,7 +77,6 @@ import NeatInterpolation import qualified Network.Wai as Wai import qualified Network.Wai.Handler.Warp as Warp import Servant -import Servant.API.Generic (ToServantApi, genericApi, toServant, (:-)) import qualified Servant.Auth as Auth import qualified Servant.Auth.Server as Auth import qualified Servant.HTML.Lucid as Lucid @@ -743,7 +742,9 @@ startup quiet = do oAuthArgs <- Envy.decodeWithDefaults Envy.defConfig kp <- Acid.openLocalStateFrom (keep cfg) init :: IO (Acid.AcidState Keep) jwk <- Auth.generateKey -- TODO: store this in a file somewhere - let ForgeURL url = homeExample cfg + let url = case homeExample cfg of + ForgeURL u -> u + CLISubmission -> "<CLISubmission>" unless quiet <| do Log.info ["boot", "dragons"] >> Log.br Log.info ["boot", "area", show <| area cfg] >> Log.br diff --git a/Biz/Que/Host.hs b/Biz/Que/Host.hs index f1b986c..da424df 100644 --- a/Biz/Que/Host.hs +++ b/Biz/Que/Host.hs @@ -38,8 +38,6 @@ import qualified Data.HashMap.Lazy as HashMap import Network.HTTP.Media ((//), (/:)) import qualified Network.Wai.Handler.Warp as Warp import Servant -import Servant.API.Generic ((:-)) --- import qualified Servant.Auth.Server as Auth import Servant.Server.Generic (AsServerT, genericServeT) import qualified Servant.Types.SourceT as Source import qualified System.Envy as Envy diff --git a/Biz/Que/Site.hs b/Biz/Que/Site.hs index e027717..7151cd0 100644 --- a/Biz/Que/Site.hs +++ b/Biz/Que/Site.hs @@ -31,7 +31,9 @@ main = Cli.main <| Cli.Plan help move test pure move :: Cli.Arguments -> IO () move args = do - let (Just src, Just ns) = (getArg "src", Text.pack </ getArg "ns") + let (src, ns) = case (getArg "src", Text.pack </ getArg "ns") of + (Just s, Just n) -> (s, n) + _ -> panic "could not initialize from CLI arguments" mKey <- getKey ns putText <| "serving " <> Text.pack src <> " at " <> ns run mKey ns @@ -132,7 +134,7 @@ serve Nothing "pub" path content = mempty liftIO <| pure () serve Nothing p _ _ = panic <| "no auth key provided for ns: " <> p -serve (Just key) ns path content = +serve (Just _) ns path content = runReq defaultHttpConfig <| do let options = header "Content-type" "text/html;charset=utf-8" |