1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

MonadFail for Matcher

This commit is contained in:
Timothy Clem 2018-10-31 08:28:22 -07:00
parent a0643b725a
commit 3e26d933b3

View File

@ -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