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

📝 MonadFunction.

This commit is contained in:
Rob Rix 2018-03-02 10:28:29 -05:00
parent 59afa36269
commit 0071b25ba7

View File

@ -13,6 +13,9 @@ import Data.Abstract.Type
import Prologue
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
abstract :: [Name] -> Subterm t (m v) -> m v
apply :: v -> [Subterm t (m v)] -> m v