1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Merge remote-tracking branch 'origin/typescript-graphs' into fix-graph-errors

This commit is contained in:
joshvera 2018-04-17 17:07:44 -04:00
commit a009d78f81
2 changed files with 12 additions and 11 deletions

View File

@ -29,19 +29,19 @@ instance ( Effectful m
analyzeTerm eval term = resumeException @(ValueError location value) (liftAnalyze analyzeTerm eval term) (
\yield error -> case error of
(ScopedEnvironmentError _) -> do
ScopedEnvironmentError{} -> do
env <- getEnv
yield (Env.push env)
CallError val -> yield val
StringError val -> yield (pack $ show val)
BoolError{} -> yield True
NumericError{} -> unit >>= yield
Numeric2Error{} -> unit >>= yield
ComparisonError{} -> unit >>= yield
NamespaceError{} -> getEnv >>= yield
BitwiseError{} -> unit >>= yield
Bitwise2Error{} -> unit >>= yield
KeyValueError{} -> unit >>= \x -> yield (x, x)
CallError val -> yield val
StringError val -> yield (pack $ show val)
BoolError{} -> yield True
NumericError{} -> unit >>= yield
Numeric2Error{} -> unit >>= yield
ComparisonError{} -> unit >>= yield
NamespaceError{} -> getEnv >>= yield
BitwiseError{} -> unit >>= yield
Bitwise2Error{} -> unit >>= yield
KeyValueError{} -> unit >>= \x -> yield (x, x)
)
analyzeModule = liftAnalyze analyzeModule

View File

@ -28,6 +28,7 @@ instance ( Effectful m
analyzeTerm eval term = resumeException @(EvalError value) (liftAnalyze analyzeTerm eval term) (
\yield err -> case err of
DefaultExportError{} -> yield ()
IntegerFormatError{} -> yield 0
FloatFormatError{} -> yield 0
RationalFormatError{} -> yield 0