mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
Simplify the EvalError carriers.
This commit is contained in:
parent
02701fccd8
commit
e3dd3b51a3
@ -296,11 +296,11 @@ instance Eq1 EvalError where
|
|||||||
instance Show1 EvalError where
|
instance Show1 EvalError where
|
||||||
liftShowsPrec _ _ = showsPrec
|
liftShowsPrec _ _ = showsPrec
|
||||||
|
|
||||||
runEvalError :: (Carrier sig m, Effect sig) => Evaluator term address value (ResumableC (BaseError EvalError) (Evaluator term address value m)) a -> Evaluator term address value m (Either (SomeError (BaseError EvalError)) a)
|
runEvalError :: (Carrier sig m, Effect sig) => Evaluator term address value (ResumableC (BaseError EvalError) (Eff m)) a -> Evaluator term address value m (Either (SomeError (BaseError EvalError)) a)
|
||||||
runEvalError = runResumable . runEvaluator
|
runEvalError = Evaluator . runResumable . runEvaluator
|
||||||
|
|
||||||
runEvalErrorWith :: Carrier sig m => (forall resume . (BaseError EvalError) resume -> Evaluator term address value m resume) -> Evaluator term address value (ResumableWithC (BaseError EvalError) (Evaluator term address value m)) a -> Evaluator term address value m a
|
runEvalErrorWith :: Carrier sig m => (forall resume . (BaseError EvalError) resume -> Evaluator term address value m resume) -> Evaluator term address value (ResumableWithC (BaseError EvalError) (Eff m)) a -> Evaluator term address value m a
|
||||||
runEvalErrorWith f = runResumableWith f . runEvaluator
|
runEvalErrorWith f = Evaluator . runResumableWith (runEvaluator . f) . runEvaluator
|
||||||
|
|
||||||
throwEvalError :: ( Member (Reader ModuleInfo) sig
|
throwEvalError :: ( Member (Reader ModuleInfo) sig
|
||||||
, Member (Reader Span) sig
|
, Member (Reader Span) sig
|
||||||
|
Loading…
Reference in New Issue
Block a user