From 0071b25ba7a91637230af44a7ceb78df6256386d Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 2 Mar 2018 10:28:29 -0500 Subject: [PATCH] :memo: MonadFunction. --- src/Control/Abstract/Function.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Control/Abstract/Function.hs b/src/Control/Abstract/Function.hs index 844d24a75..b765f70e4 100644 --- a/src/Control/Abstract/Function.hs +++ b/src/Control/Abstract/Function.hs @@ -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