diff options
author | Ben Sima <ben@bsima.me> | 2019-09-06 08:23:49 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2019-09-06 08:23:49 -0700 |
commit | 96b232c6e21710a1b0e79946de09bef7890429db (patch) | |
tree | 280c5706d19ca5149d4bcb0c1d4024d8760c8b4b | |
parent | 752dcc5e1b04c507c67485c137b7ece2208e6f42 (diff) |
[ibb] derive Network.RemoteData instances
-rw-r--r-- | lore/Network/RemoteData.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lore/Network/RemoteData.hs b/lore/Network/RemoteData.hs index a2c58a7..2fe6557 100644 --- a/lore/Network/RemoteData.hs +++ b/lore/Network/RemoteData.hs @@ -8,6 +8,7 @@ data RemoteData a b | Loading | Failure a | Success b + deriving (Eq, Show) -- TODO figure out Http.Error -- type WebData a = RemoteData Http.Error a @@ -25,9 +26,6 @@ instance Applicative (RemoteData e) where Failure a <*> _ = Failure a Success a <*> b = fmap a b -instance Show (RemoteData a b) -instance Eq (RemoteData a b) - fromEither :: Either a b -> RemoteData a b fromEither (Left a) = Failure a fromEither (Right a) = Success a |