1
1
mirror of https://github.com/github/semantic.git synced 2024-12-14 17:31:48 +03:00

🔥 the RefError constructor.

This commit is contained in:
Rob Rix 2018-12-10 12:40:45 -05:00
parent 857d2e3b24
commit efcb65966b
2 changed files with 0 additions and 4 deletions

View File

@ -181,7 +181,6 @@ defineSelf = do
-- | The type of error thrown when failing to evaluate a term.
data EvalError address value return where
DerefError :: value -> EvalError address value value
RefError :: EvalError address value (Slot address)
DefaultExportError :: EvalError address value ()
ExportError :: ModulePath -> Name -> EvalError address value ()
-- Indicates that our evaluator wasn't able to make sense of these literals.
@ -197,7 +196,6 @@ deriving instance (Show address, Show value) => Show (EvalError address value re
instance NFData value => NFData1 (EvalError address value) where
liftRnf _ x = case x of
DerefError v -> rnf v
RefError -> ()
DefaultExportError -> ()
ExportError p n -> rnf p `seq` rnf n
FloatFormatError i -> rnf i
@ -211,7 +209,6 @@ instance (NFData value, NFData return) => NFData (EvalError address value return
instance Eq value => Eq1 (EvalError address value) where
liftEq _ (DerefError v) (DerefError v2) = v == v2
liftEq _ RefError RefError = True
liftEq _ DefaultExportError DefaultExportError = True
liftEq _ (ExportError a b) (ExportError c d) = (a == c) && (b == d)
liftEq _ (FloatFormatError a) (FloatFormatError b) = a == b

View File

@ -368,7 +368,6 @@ resumingEvalError :: ( Carrier sig m
-> Evaluator term address value m a
resumingEvalError = runEvalErrorWith (\ baseError -> traceError "EvalError" baseError *> case baseErrorException baseError of
DerefError{} -> pure hole
RefError -> pure hole
ReferenceError{} -> pure hole
DefaultExportError{} -> pure ()
ExportError{} -> pure ()