mirror of
https://github.com/github/semantic.git
synced 2024-12-29 01:42:43 +03:00
Run resumingValueError in State instead of Env.
This commit is contained in:
parent
a243f2d837
commit
a5072958b5
@ -129,7 +129,7 @@ resumingAddressError = runAddressErrorWith (\ err -> trace ("AddressError:" <> s
|
||||
UnallocatedAddress _ -> pure lowerBound
|
||||
UninitializedAddress _ -> pure hole)
|
||||
|
||||
resumingValueError :: (Member (Env address) effects, Member Trace effects, Show address) => Evaluator address (Value address body) (Resumable (ValueError address body) ': effects) a -> Evaluator address (Value address body) effects a
|
||||
resumingValueError :: (Member (State (Environment address)) effects, Member Trace effects, Show address) => Evaluator address (Value address body) (Resumable (ValueError address body) ': effects) a -> Evaluator address (Value address body) effects a
|
||||
resumingValueError = runValueErrorWith (\ err -> trace ("ValueError" <> show err) *> case err of
|
||||
CallError val -> pure val
|
||||
StringError val -> pure (pack (show val))
|
||||
@ -139,7 +139,7 @@ resumingValueError = runValueErrorWith (\ err -> trace ("ValueError" <> show err
|
||||
NumericError{} -> pure hole
|
||||
Numeric2Error{} -> pure hole
|
||||
ComparisonError{} -> pure hole
|
||||
NamespaceError{} -> getEnv
|
||||
NamespaceError{} -> get @(Environment _)
|
||||
BitwiseError{} -> pure hole
|
||||
Bitwise2Error{} -> pure hole
|
||||
KeyValueError{} -> pure (hole, hole)
|
||||
|
Loading…
Reference in New Issue
Block a user