diff options
author | Ben Sima <ben@bsima.me> | 2021-01-29 02:37:14 -0500 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2021-01-29 03:22:01 -0500 |
commit | b289dee25ad8ce4c2622fadb2f4c31fb90914b39 (patch) | |
tree | 5511da780cdabbb98c8fbe01f03997d3263e7880 /Biz/Que/Site.hs | |
parent | 42c7614b6a4bd7504e9bf31e0882db58b85857bc (diff) |
Lint 'return' into 'pure', replace bind operator
Diffstat (limited to 'Biz/Que/Site.hs')
-rw-r--r-- | Biz/Que/Site.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Biz/Que/Site.hs b/Biz/Que/Site.hs index 3e456da..0d89400 100644 --- a/Biz/Que/Site.hs +++ b/Biz/Que/Site.hs @@ -83,7 +83,7 @@ getKey ns = do auth ns |> Config.parseIniFile conf |> either errorParsingConf identity - |> return + |> pure errorParsingConf :: error errorParsingConf = panic "could not parse ~/.config/que.conf" @@ -111,11 +111,11 @@ run key ns Sources {..} = Async.runConcurrently actions |> void actions = traverse Async.Concurrently - [ toHtml index >>= serve key ns "index" |> forever, - toHtml quescripts >>= serve key ns "quescripts" |> forever, - BS.readFile client >>= serve key ns "client" |> forever, - toHtml tutorial >>= serve key ns "tutorial" |> forever, - toHtml apidocs >>= serve key ns "apidocs" |> forever + [ toHtml index +> serve key ns "index" |> forever, + toHtml quescripts +> serve key ns "quescripts" |> forever, + BS.readFile client +> serve key ns "client" |> forever, + toHtml tutorial +> serve key ns "tutorial" |> forever, + toHtml apidocs +> serve key ns "apidocs" |> forever ] toHtml :: FilePath -> IO ByteString toHtml md = @@ -143,7 +143,7 @@ serve Nothing "pub" path content = (ReqBodyBs content) ignoreResponse mempty - liftIO <| return () + liftIO <| pure () serve Nothing p _ _ = panic <| "no auth key provided for ns: " <> p serve (Just key) ns path content = runReq defaultHttpConfig <| do @@ -156,4 +156,4 @@ serve (Just key) ns path content = (ReqBodyBs content) ignoreResponse options - liftIO <| return () + liftIO <| pure () |