mirror of
https://github.com/github/semantic.git
synced 2024-12-20 21:31:48 +03:00
Run unspecialized errors with a specialized handler.
This commit is contained in:
parent
05baa63939
commit
1f0bc214e6
@ -3,6 +3,7 @@ module Data.Abstract.Evaluatable
|
||||
( module X
|
||||
, Evaluatable(..)
|
||||
, Unspecialized(..)
|
||||
, runUnspecialized
|
||||
, EvalError(..)
|
||||
, LoadError(..)
|
||||
, runLoadError
|
||||
@ -183,6 +184,9 @@ deriving instance Show (Unspecialized a b)
|
||||
instance Show1 (Unspecialized a) where
|
||||
liftShowsPrec _ _ = showsPrec
|
||||
|
||||
runUnspecialized :: Evaluator location term value (Resumable (Unspecialized value) ': effects) a -> Evaluator location term value effects (Either (SomeExc (Unspecialized value)) a)
|
||||
runUnspecialized = raiseHandler runError
|
||||
|
||||
|
||||
-- Instances
|
||||
|
||||
|
@ -36,7 +36,7 @@ justEvaluating
|
||||
. evaluating
|
||||
. runLoadError
|
||||
. erroring @(ValueError Precise (Value Precise))
|
||||
. erroring @(Unspecialized (Value Precise))
|
||||
. runUnspecialized
|
||||
. erroring @ResolutionError
|
||||
. erroring @(EvalError (Value Precise))
|
||||
. runAddressError
|
||||
@ -57,7 +57,7 @@ checking
|
||||
. evaluating
|
||||
. providingLiveSet
|
||||
. runLoadError
|
||||
. erroring @(Unspecialized (Type Monovariant))
|
||||
. runUnspecialized
|
||||
. erroring @ResolutionError
|
||||
. erroring @(EvalError (Type Monovariant))
|
||||
. runAddressError
|
||||
|
Loading…
Reference in New Issue
Block a user