From 2fac80aa1727a200f576f899bb325f523842c3ff Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 1 May 2024 22:35:36 -0400 Subject: Turn on more Haskell errors I actually thought these were turned on, but found that they weren't when I was investigating Haddock stuff. There aren't many violations, so I just turned them on and fixed the violations real quick. --- Biz/Que/Host.hs | 2 -- Biz/Que/Site.hs | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Biz/Que') 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 (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" -- cgit v1.2.3