diff options
Diffstat (limited to 'Biz/Ibb/Move.hs')
-rw-r--r-- | Biz/Ibb/Move.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Biz/Ibb/Move.hs b/Biz/Ibb/Move.hs index 0dec4e5..2135f85 100644 --- a/Biz/Ibb/Move.hs +++ b/Biz/Ibb/Move.hs @@ -27,8 +27,9 @@ import Network.RemoteData move :: Action -> Model -> Effect Action Model move Nop m = noEff m move (HandleRoute u) m = m {uri = u} <# pure Nop -move (ChangeRoute u) m = m <# do - pushURI u >> pure Nop +move (ChangeRoute u) m = + m <# do + pushURI u >> pure Nop move FetchPeople m = m <# (SetPeople </ fetchPeople) move (SetPeople ps) m = noEff m {people = ps} @@ -36,9 +37,9 @@ fetchPeople :: IO (WebData [Core.Person]) fetchPeople = do mjson <- contents </ xhrByteString req case mjson of - Nothing -> pure $ Failure "could not read from server" + Nothing -> pure <| Failure "could not read from server" Just a -> - pure $ fromEither $ either (Left . ms) pure $ eitherDecodeStrict a + pure <| fromEither <| either (Left <. ms) pure <| eitherDecodeStrict a where req = Request |