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:
parent
ef05ef941a
commit
fca3027fc7
@ -3,6 +3,7 @@ module Semantic.Parse
|
|||||||
( Parse(..)
|
( Parse(..)
|
||||||
) where
|
) where
|
||||||
|
|
||||||
|
import Control.Effect.Carrier
|
||||||
import Data.Blob
|
import Data.Blob
|
||||||
import Parsing.Parser
|
import Parsing.Parser
|
||||||
|
|
||||||
@ -10,3 +11,6 @@ data Parse m k
|
|||||||
= forall term . Parse (Parser term) Blob (term -> m k)
|
= forall term . Parse (Parser term) Blob (term -> m k)
|
||||||
|
|
||||||
deriving instance Functor m => Functor (Parse m)
|
deriving instance Functor m => Functor (Parse m)
|
||||||
|
|
||||||
|
instance HFunctor Parse where
|
||||||
|
hmap f (Parse parser blob k) = Parse parser blob (f . k)
|
||||||
|
Loading…
Reference in New Issue
Block a user