1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

Simplify the UnspecializedError carriers.

This commit is contained in:
Rob Rix 2018-10-22 12:05:57 -04:00
parent f6780cdfeb
commit 02701fccd8

View File

@ -332,15 +332,15 @@ instance Show1 (UnspecializedError a) where
liftShowsPrec _ _ = showsPrec liftShowsPrec _ _ = showsPrec
runUnspecialized :: (Carrier sig m, Effect sig) runUnspecialized :: (Carrier sig m, Effect sig)
=> Evaluator term address value (ResumableC (BaseError (UnspecializedError value)) (Evaluator term address value m)) a => Evaluator term address value (ResumableC (BaseError (UnspecializedError value)) (Eff m)) a
-> Evaluator term address value m (Either (SomeError (BaseError (UnspecializedError value))) a) -> Evaluator term address value m (Either (SomeError (BaseError (UnspecializedError value))) a)
runUnspecialized = runResumable . runEvaluator runUnspecialized = Evaluator . runResumable . runEvaluator
runUnspecializedWith :: Carrier sig m runUnspecializedWith :: Carrier sig m
=> (forall resume . BaseError (UnspecializedError value) resume -> Evaluator term address value m resume) => (forall resume . BaseError (UnspecializedError value) resume -> Evaluator term address value m resume)
-> Evaluator term address value (ResumableWithC (BaseError (UnspecializedError value)) (Evaluator term address value m)) a -> Evaluator term address value (ResumableWithC (BaseError (UnspecializedError value)) (Eff m)) a
-> Evaluator term address value m a -> Evaluator term address value m a
runUnspecializedWith f = runResumableWith f . runEvaluator runUnspecializedWith f = Evaluator . runResumableWith (runEvaluator . f) . runEvaluator
throwUnspecializedError :: ( Member (Resumable (BaseError (UnspecializedError value))) sig throwUnspecializedError :: ( Member (Resumable (BaseError (UnspecializedError value))) sig
, Member (Reader ModuleInfo) sig , Member (Reader ModuleInfo) sig