mirror of
https://github.com/github/semantic.git
synced 2024-12-29 18:06:14 +03:00
Define an Interpreter instance for BadModuleResolutions.
This commit is contained in:
parent
5df26fd4a9
commit
ef4ed428cf
@ -2,6 +2,7 @@
|
||||
module Analysis.Abstract.BadModuleResolutions where
|
||||
|
||||
import Control.Abstract.Analysis
|
||||
import Control.Monad.Effect.Internal hiding (interpret)
|
||||
import Data.Abstract.Evaluatable
|
||||
import Prologue
|
||||
|
||||
@ -26,3 +27,9 @@ instance ( Effectful m
|
||||
TypeScriptError nameToResolve -> yield nameToResolve)
|
||||
|
||||
analyzeModule = liftAnalyze analyzeModule
|
||||
|
||||
instance Interpreter effects result rest m
|
||||
=> Interpreter (Resumable (ResolutionError value) ': effects) result rest (BadModuleResolutions m) where
|
||||
interpret = interpret . raise @m . relay pure (\ (Resumable err) yield -> case err of
|
||||
RubyError nameToResolve -> yield nameToResolve
|
||||
TypeScriptError nameToResolve -> yield nameToResolve) . lower
|
||||
|
Loading…
Reference in New Issue
Block a user