mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
📝 MonadFunction.
This commit is contained in:
parent
59afa36269
commit
0071b25ba7
@ -13,6 +13,9 @@ import Data.Abstract.Type
|
|||||||
import Prologue
|
import Prologue
|
||||||
import Prelude hiding (fail)
|
import Prelude hiding (fail)
|
||||||
|
|
||||||
|
-- | A 'Monad' abstracting the evaluation of (and under) binding constructs (functions, methods, etc).
|
||||||
|
--
|
||||||
|
-- This allows us to abstract the choice of whether to evaluate under binders for different value types.
|
||||||
class MonadEvaluator t v m => MonadFunction t v m where
|
class MonadEvaluator t v m => MonadFunction t v m where
|
||||||
abstract :: [Name] -> Subterm t (m v) -> m v
|
abstract :: [Name] -> Subterm t (m v) -> m v
|
||||||
apply :: v -> [Subterm t (m v)] -> m v
|
apply :: v -> [Subterm t (m v)] -> m v
|
||||||
|
Loading…
Reference in New Issue
Block a user