mirror of
https://github.com/github/semantic.git
synced 2025-01-08 08:30:27 +03:00
🔥 withModules.
This commit is contained in:
parent
5cf9dc20af
commit
aed9457896
@ -9,9 +9,8 @@ module Data.Abstract.Evaluatable
|
|||||||
, variable
|
, variable
|
||||||
, evaluateTerm
|
, evaluateTerm
|
||||||
, evaluateModule
|
, evaluateModule
|
||||||
, evaluatePackage
|
|
||||||
, withModules
|
|
||||||
, evaluateModules
|
, evaluateModules
|
||||||
|
, evaluatePackage
|
||||||
, throwLoadError
|
, throwLoadError
|
||||||
, require
|
, require
|
||||||
, load
|
, load
|
||||||
@ -172,14 +171,6 @@ evaluateModule :: MonadEvaluatable location term value m
|
|||||||
-> m value
|
-> m value
|
||||||
evaluateModule m = analyzeModule (subtermValue . moduleBody) (fmap (Subterm <*> evaluateTerm) m)
|
evaluateModule m = analyzeModule (subtermValue . moduleBody) (fmap (Subterm <*> evaluateTerm) m)
|
||||||
|
|
||||||
|
|
||||||
-- | Run an action with the a list of 'Module's available for imports.
|
|
||||||
withModules :: MonadEvaluatable location term value m
|
|
||||||
=> [Module term]
|
|
||||||
-> m a
|
|
||||||
-> m a
|
|
||||||
withModules = localModuleTable . const . ModuleTable.fromModules
|
|
||||||
|
|
||||||
-- | Evaluate with a list of modules in scope, taking the head module as the entry point.
|
-- | Evaluate with a list of modules in scope, taking the head module as the entry point.
|
||||||
evaluateModules :: ( Effectful m
|
evaluateModules :: ( Effectful m
|
||||||
, Member (Reader (SomeOrigin term)) effects
|
, Member (Reader (SomeOrigin term)) effects
|
||||||
|
Loading…
Reference in New Issue
Block a user