mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
Let's eval javascript projects
This commit is contained in:
parent
ab0a6072b8
commit
25e70aa7a3
@ -80,8 +80,15 @@ evalTypeScriptProject path = runEvaluating . evaluatePackageBody <$> parseProjec
|
|||||||
evalTypeScriptFile path = runEvaluating . evaluateModule <$> parseFile typescriptParser Nothing path
|
evalTypeScriptFile path = runEvaluating . evaluateModule <$> parseFile typescriptParser Nothing path
|
||||||
typecheckTypeScriptFile path = runAnalysis @(Caching (Evaluating Monovariant TypeScript.Term Type)) . evaluateModule <$> parseFile typescriptParser Nothing path
|
typecheckTypeScriptFile path = runAnalysis @(Caching (Evaluating Monovariant TypeScript.Term Type)) . evaluateModule <$> parseFile typescriptParser Nothing path
|
||||||
|
|
||||||
|
-- JavaScript
|
||||||
|
evalJavaScriptProject path = runAnalysis @(EvaluatingWithHoles TypeScript.Term) . evaluatePackageBody <$> parseProject typescriptParser ["js"] path
|
||||||
|
|
||||||
runEvaluatingWithPrelude parser exts path = runEvaluating <$> (withPrelude <$> parsePrelude parser <*> (evaluatePackageBody <$> parseProject parser exts path))
|
runEvaluatingWithPrelude parser exts path = runEvaluating <$> (withPrelude <$> parsePrelude parser <*> (evaluatePackageBody <$> parseProject parser exts path))
|
||||||
|
|
||||||
|
type EvaluatingWithHoles term = BadModuleResolutions (BadVariables (BadValues (Quietly (Evaluating (Located Precise term) term (Value (Located Precise term))))))
|
||||||
|
type ImportGraphingWithHoles term = ImportGraphing (EvaluatingWithHoles term)
|
||||||
|
|
||||||
|
|
||||||
-- TODO: Remove this by exporting EvaluatingEffects
|
-- TODO: Remove this by exporting EvaluatingEffects
|
||||||
runEvaluating :: forall term effects a.
|
runEvaluating :: forall term effects a.
|
||||||
( Effects Precise term (Value Precise) (Evaluating Precise term (Value Precise) effects) ~ effects
|
( Effects Precise term (Value Precise) (Evaluating Precise term (Value Precise) effects) ~ effects
|
||||||
|
Loading…
Reference in New Issue
Block a user