mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
Derive a MonadEvaluator instance for Evaluation.
This commit is contained in:
parent
788b4f5195
commit
7ceb6d6370
@ -1,4 +1,4 @@
|
|||||||
{-# LANGUAGE DataKinds, GeneralizedNewtypeDeriving, ScopedTypeVariables, TypeApplications, TypeFamilies, TypeOperators, MultiParamTypeClasses, UndecidableInstances #-}
|
{-# LANGUAGE DataKinds, GeneralizedNewtypeDeriving, ScopedTypeVariables, StandaloneDeriving, TypeApplications, TypeFamilies, TypeOperators, MultiParamTypeClasses, UndecidableInstances #-}
|
||||||
module Analysis.Abstract.Evaluating where
|
module Analysis.Abstract.Evaluating where
|
||||||
|
|
||||||
import Prologue
|
import Prologue
|
||||||
@ -105,6 +105,9 @@ evaluates pairs (_, t) = run @(Evaluating term v) (runEvaluator (localModuleTabl
|
|||||||
newtype Evaluation term value a = Evaluation { runEvaluation :: Evaluator (Evaluating term value) term value a }
|
newtype Evaluation term value a = Evaluation { runEvaluation :: Evaluator (Evaluating term value) term value a }
|
||||||
deriving (Applicative, Functor, Monad, MonadFail)
|
deriving (Applicative, Functor, Monad, MonadFail)
|
||||||
|
|
||||||
|
deriving instance MonadEvaluator term value (Evaluator (Evaluating term value) term value)
|
||||||
|
=> MonadEvaluator term value (Evaluation term value)
|
||||||
|
|
||||||
instance ( AbstractValue v
|
instance ( AbstractValue v
|
||||||
, Evaluatable (Base t)
|
, Evaluatable (Base t)
|
||||||
, FreeVariables t
|
, FreeVariables t
|
||||||
|
Loading…
Reference in New Issue
Block a user