From be9c27a32d357a49cb379fe9fc477551f55b2605 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 3 Apr 2018 19:07:20 -0400 Subject: [PATCH] Generalize go to eliminate TaskF. --- src/Semantic/Task.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Semantic/Task.hs b/src/Semantic/Task.hs index be8a04fc2..c1c985e38 100644 --- a/src/Semantic/Task.hs +++ b/src/Semantic/Task.hs @@ -185,7 +185,7 @@ runTaskWithOptions options task = do where run' :: Task a -> IO (Either SomeException a) run' = runM . runError . flip runReader statter . flip runReader logger . flip runReader options . go - go :: Task a -> Eff '[Reader Options, Reader Logger, Reader Statter, Exc SomeException, IO] a + go :: Members '[Reader Options, Reader Logger, Reader Statter, Exc SomeException, IO] effs => Eff (TaskF ': effs) a -> Eff effs a go = interpret (\ task -> case task of ReadBlobs (Left handle) -> rethrowing (IO.readBlobsFromHandle handle) ReadBlobs (Right paths@[(path, Nothing)]) -> rethrowing (IO.isDirectory path >>= bool (IO.readBlobsFromPaths paths) (IO.readBlobsFromDir path))