packages feed

linnet 0.1.0.1 → 0.1.0.2

raw patch · 3 files changed

+8/−10 lines, 3 files

Files

linnet.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 name: linnet-version: 0.1.0.1+version: 0.1.0.2 license: Apache license-file: LICENSE copyright: 2019 Sergey Kolbasov
src/Linnet/Output.hs view
@@ -60,6 +60,7 @@     , outputPayload :: Payload a     , outputHeaders :: [Header]     }+  deriving (Eq)  -- | Payload of 'Output' that could be: data Payload a@@ -67,6 +68,12 @@   | NoPayload -- ^ Represents empty response   | forall e. Exception e =>               ErrorPayload e -- ^ Failed payload with an exception inside++instance (Eq a) => Eq (Payload a) where+  (==) (Payload a) (Payload b)            = a == b+  (==) NoPayload NoPayload                = True+  (==) (ErrorPayload e) (ErrorPayload e') = show e == show e'+  (==) _ _                                = False  deriving instance (Show a) => Show (Payload a) 
test/Instances.hs view
@@ -271,15 +271,6 @@ instance (Arbitrary a, MC.MonadCatch m) => Arbitrary (Endpoint m a) where   arbitrary = oneof [genEndpoint, genErrorEndpoint, genConstEndpoint, genEmptyEndpoint] -instance (Eq a) => Eq (Payload a) where-  (==) (Payload a) (Payload b) = a == b-  (==) NoPayload NoPayload = True-  (==) (ErrorPayload ea) (ErrorPayload eb) = show (toException ea) == show (toException eb)-  (==) _ _ = False--instance (Eq a) => Eq (Output a) where-  (==) (Output sa pa ha) (Output sb pb hb) = sa == sb && pa == pb && ha == hb- instance Eq Input where   (==) i i' = reminder i == reminder i' && request i == request i'