From 96b232c6e21710a1b0e79946de09bef7890429db Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 6 Sep 2019 08:23:49 -0700 Subject: [ibb] derive Network.RemoteData instances --- lore/Network/RemoteData.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lore/Network') 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 -- cgit v1.2.3