mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
MonadFail for Matcher
This commit is contained in:
parent
a0643b725a
commit
3e26d933b3
@ -55,6 +55,9 @@ instance Alternative (Matcher t) where
|
||||
instance Monad (Matcher t) where
|
||||
(>>=) = Then
|
||||
|
||||
instance MonadFail (Matcher t) where
|
||||
fail _ = Empty
|
||||
|
||||
-- | This matcher always succeeds.
|
||||
succeeds :: Matcher t ()
|
||||
succeeds = guard True
|
||||
|
Loading…
Reference in New Issue
Block a user