diff --git a/src/Semantic/Util.hs b/src/Semantic/Util.hs index a382cabb8..ca020feb0 100644 --- a/src/Semantic/Util.hs +++ b/src/Semantic/Util.hs @@ -80,8 +80,15 @@ evalTypeScriptProject path = runEvaluating . evaluatePackageBody <$> parseProjec evalTypeScriptFile path = runEvaluating . 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)) +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 runEvaluating :: forall term effects a. ( Effects Precise term (Value Precise) (Evaluating Precise term (Value Precise) effects) ~ effects