1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 13:51:44 +03:00

Define an HFunctor instance for Parse.

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

View File

@ -3,6 +3,7 @@ module Semantic.Parse
( Parse(..)
) where
import Control.Effect.Carrier
import Data.Blob
import Parsing.Parser
@ -10,3 +11,6 @@ data Parse m k
= forall term . Parse (Parser term) Blob (term -> m k)
deriving instance Functor m => Functor (Parse m)
instance HFunctor Parse where
hmap f (Parse parser blob k) = Parse parser blob (f . k)