1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 07:25:44 +03:00

Combine the alternatives using sconcat.

This commit is contained in:
Rob Rix 2017-08-04 12:27:43 -04:00
parent 3e95004249
commit 48d368683c

View File

@ -40,7 +40,7 @@ instance Applicative (Amb l) where
instance Monad (Amb l) where instance Monad (Amb l) where
return = pure return = pure
None a >>= _ = None a None a >>= _ = None a
Some as >>= f = foldr1 (<>) (f <$> as) Some as >>= f = sconcat (f <$> as)
instance MonadError l (Amb l) where instance MonadError l (Amb l) where
throwError = None throwError = None