mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
Simplify the EnvironmentError carriers.
This commit is contained in:
parent
db9947e742
commit
6b15bf489c
@ -214,15 +214,15 @@ freeVariableError :: ( Member (Reader ModuleInfo) sig
|
|||||||
freeVariableError = throwEnvironmentError . FreeVariable
|
freeVariableError = throwEnvironmentError . FreeVariable
|
||||||
|
|
||||||
runEnvironmentError :: (Carrier sig m, Effect sig)
|
runEnvironmentError :: (Carrier sig m, Effect sig)
|
||||||
=> Evaluator term address value (ResumableC (BaseError (EnvironmentError address)) (Evaluator term address value m)) a
|
=> Evaluator term address value (ResumableC (BaseError (EnvironmentError address)) (Eff m)) a
|
||||||
-> Evaluator term address value m (Either (SomeError (BaseError (EnvironmentError address))) a)
|
-> Evaluator term address value m (Either (SomeError (BaseError (EnvironmentError address))) a)
|
||||||
runEnvironmentError = runResumable . runEvaluator
|
runEnvironmentError = Evaluator . runResumable . runEvaluator
|
||||||
|
|
||||||
runEnvironmentErrorWith :: Carrier sig m
|
runEnvironmentErrorWith :: Carrier sig m
|
||||||
=> (forall resume . BaseError (EnvironmentError address) resume -> Evaluator term address value m resume)
|
=> (forall resume . BaseError (EnvironmentError address) resume -> Evaluator term address value m resume)
|
||||||
-> Evaluator term address value (ResumableWithC (BaseError (EnvironmentError address)) (Evaluator term address value m)) a
|
-> Evaluator term address value (ResumableWithC (BaseError (EnvironmentError address)) (Eff m)) a
|
||||||
-> Evaluator term address value m a
|
-> Evaluator term address value m a
|
||||||
runEnvironmentErrorWith f = runResumableWith f . runEvaluator
|
runEnvironmentErrorWith f = Evaluator . runResumableWith (runEvaluator . f) . runEvaluator
|
||||||
|
|
||||||
throwEnvironmentError :: ( Member (Resumable (BaseError (EnvironmentError address))) sig
|
throwEnvironmentError :: ( Member (Resumable (BaseError (EnvironmentError address))) sig
|
||||||
, Member (Reader ModuleInfo) sig
|
, Member (Reader ModuleInfo) sig
|
||||||
|
Loading…
Reference in New Issue
Block a user