summaryrefslogtreecommitdiff
path: root/Hero/Node.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-01-29 02:37:14 -0500
committerBen Sima <ben@bsima.me>2021-01-29 03:22:01 -0500
commitb289dee25ad8ce4c2622fadb2f4c31fb90914b39 (patch)
tree5511da780cdabbb98c8fbe01f03997d3263e7880 /Hero/Node.hs
parent42c7614b6a4bd7504e9bf31e0882db58b85857bc (diff)
Lint 'return' into 'pure', replace bind operator
Diffstat (limited to 'Hero/Node.hs')
-rw-r--r--Hero/Node.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Hero/Node.hs b/Hero/Node.hs
index e7eb687..a453a01 100644
--- a/Hero/Node.hs
+++ b/Hero/Node.hs
@@ -193,7 +193,7 @@ move ValidateUserPassword form =
doLogin = do
user <- getValue =<< Document.getElementById "user"
pass <- getValue =<< Document.getElementById "pass"
- sendLogin (ms user) (ms pass) >>= \case
+ sendLogin (ms user) (ms pass) +> \case
Network.Success _ -> pure NoOp
-- TODO: handle these error cases
Network.Loading -> pure NoOp
@@ -202,7 +202,7 @@ move ValidateUserPassword form =
fetchComics :: IO (Network.RemoteData MisoString [Comic])
fetchComics =
- Ajax.xhrByteString req /> Ajax.contents >>= \case
+ Ajax.xhrByteString req /> Ajax.contents +> \case
Nothing ->
pure <| Network.Failure "Could not fetch comics from server."
Just json ->
@@ -231,7 +231,7 @@ sendLogin ::
User
)
sendLogin u p =
- Ajax.xhrByteString req /> Ajax.contents >>= \case
+ Ajax.xhrByteString req /> Ajax.contents +> \case
Nothing ->
pure <| Network.Failure "Could not send login request."
Just json ->