mirror of
https://github.com/github/semantic.git
synced 2024-12-20 21:31:48 +03:00
Use a specialized handler for AddressError.
This commit is contained in:
parent
97159dcfbe
commit
996b5cbd43
@ -1,4 +1,4 @@
|
||||
{-# LANGUAGE GADTs, UndecidableInstances #-}
|
||||
{-# LANGUAGE GADTs, TypeOperators, UndecidableInstances #-}
|
||||
module Control.Abstract.Addressable where
|
||||
|
||||
import Control.Abstract.Evaluator
|
||||
@ -95,3 +95,6 @@ instance Eq location => Eq1 (AddressError location value) where
|
||||
|
||||
throwAddressError :: Member (Resumable (AddressError location value)) effects => AddressError location value resume -> Evaluator location term value effects resume
|
||||
throwAddressError = raise . Eff.throwError
|
||||
|
||||
runAddressError :: Evaluator location term value (Resumable (AddressError location value) ': effects) a -> Evaluator location term value effects (Either (SomeExc (AddressError location value)) a)
|
||||
runAddressError = raiseHandler runError
|
||||
|
@ -39,7 +39,7 @@ justEvaluating
|
||||
. erroring @(Unspecialized (Value Precise))
|
||||
. erroring @ResolutionError
|
||||
. erroring @(EvalError (Value Precise))
|
||||
. erroring @(AddressError Precise (Value Precise))
|
||||
. runAddressError
|
||||
|
||||
evaluatingWithHoles
|
||||
= run
|
||||
@ -60,7 +60,7 @@ checking
|
||||
. erroring @(Unspecialized (Type Monovariant))
|
||||
. erroring @ResolutionError
|
||||
. erroring @(EvalError (Type Monovariant))
|
||||
. erroring @(AddressError Monovariant (Type Monovariant))
|
||||
. runAddressError
|
||||
. typeChecking
|
||||
. caching @[]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user