We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
vrom911
Learn more about funding links in repositories.
Report abuse
1 parent 49ad9a0 commit 9d3a202Copy full SHA for 9d3a202
trial/src/Trial.hs
@@ -282,7 +282,7 @@ instance Applicative (Trial e) where
282
both 'Fiasco's.
283
284
>>> fiasco "No info" <|> pure 42
285
-Result (fromList []) 42
+Result (fromList ["No info"]) 42
286
>>> pure 42 <|> result "Something" 10
287
Result (fromList []) 42
288
>>> fiasco "No info" <|> fiasco "Some info"
@@ -297,7 +297,7 @@ instance Alternative (Trial e) where
297
298
(<|>) :: Trial e a -> Trial e a -> Trial e a
299
r@Result{} <|> _ = r
300
- _ <|> r@Result{} = r
+ f@Fiasco{} <|> r@Result{} = f <> r
301
(Fiasco e1) <|> (Fiasco e2) = Fiasco (e1 <> e2)
302
{-# INLINE (<|>) #-}
303
0 commit comments