diff --git a/src/Data/Abstract/Evaluatable.hs b/src/Data/Abstract/Evaluatable.hs index 175ea4de9..3c6f772be 100644 --- a/src/Data/Abstract/Evaluatable.hs +++ b/src/Data/Abstract/Evaluatable.hs @@ -171,21 +171,25 @@ data EvalError address value return where NoNameError :: EvalError address value Name RationalFormatError :: Text -> EvalError address value Rational ReferenceError :: value -> Name -> EvalError address value (ValueRef address value) + ConstructorError :: Name -> EvalError address value address + ScopedEnvError :: value -> EvalError address value address deriving instance (Eq address, Eq value) => Eq (EvalError address value return) deriving instance (Show address, Show value) => Show (EvalError address value return) instance NFData value => NFData1 (EvalError address value) where liftRnf _ x = case x of - DerefError v -> rnf v - DefaultExportError -> () - ExportError p n -> rnf p `seq` rnf n - FloatFormatError i -> rnf i - IntegerFormatError i -> rnf i - NoNameError -> () - RationalFormatError i -> rnf i - ReferenceError v n -> rnf v `seq` rnf n + DerefError v -> rnf v + DefaultExportError -> () + ExportError p n -> rnf p `seq` rnf n + FloatFormatError i -> rnf i + IntegerFormatError i -> rnf i + NoNameError -> () + RationalFormatError i -> rnf i + ReferenceError v n -> rnf v `seq` rnf n QualifiedImportError i -> rnf i + ConstructorError n -> rnf n + ScopedEnvError v -> rnf v instance (NFData value, NFData return) => NFData (EvalError address value return) where rnf = liftRnf rnf diff --git a/src/Semantic/Graph.hs b/src/Semantic/Graph.hs index d8be24b8e..6a8c1cf21 100644 --- a/src/Semantic/Graph.hs +++ b/src/Semantic/Graph.hs @@ -366,15 +366,17 @@ resumingEvalError :: ( Carrier sig m m)) a -> Evaluator term address value m a resumingEvalError = runEvalErrorWith (\ baseError -> traceError "EvalError" baseError *> case baseErrorException baseError of + ConstructorError _ -> pure hole + ScopedEnvError _ -> pure hole QualifiedImportError{} -> pure hole - DerefError{} -> pure hole - ReferenceError{} -> pure hole - DefaultExportError{} -> pure () - ExportError{} -> pure () - IntegerFormatError{} -> pure 0 - FloatFormatError{} -> pure 0 - RationalFormatError{} -> pure 0 - NoNameError -> gensym) + DerefError{} -> pure hole + ReferenceError{} -> pure hole + DefaultExportError{} -> pure () + ExportError{} -> pure () + IntegerFormatError{} -> pure 0 + FloatFormatError{} -> pure 0 + RationalFormatError{} -> pure 0 + NoNameError -> gensym) resumingUnspecialized :: ( AbstractHole value , Carrier sig m