1
1
mirror of https://github.com/github/semantic.git synced 2024-12-30 18:36:27 +03:00

Define an Effect instance for Parse.

This commit is contained in:
Rob Rix 2019-09-30 14:27:31 -04:00
parent fca3027fc7
commit bba02fe178
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -14,3 +14,6 @@ deriving instance Functor m => Functor (Parse m)
instance HFunctor Parse where
hmap f (Parse parser blob k) = Parse parser blob (f . k)
instance Effect Parse where
handle state handler (Parse parser blob k) = Parse parser blob (handler . (<$ state) . k)