diff options
author | Ben Sima <ben@bsima.me> | 2024-05-01 22:35:36 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2024-05-09 21:38:52 -0400 |
commit | 2fac80aa1727a200f576f899bb325f523842c3ff (patch) | |
tree | 66668874a8e7a546473ba66d1159cf36c9751dc5 /Biz/Que | |
parent | d71c6f8c5955e8a9861e3f3957b293a369aac954 (diff) |
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.
Diffstat (limited to 'Biz/Que')
-rw-r--r-- | Biz/Que/Host.hs | 2 | ||||
-rw-r--r-- | Biz/Que/Site.hs | 6 |
2 files changed, 4 insertions, 4 deletions
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" |