From 8f0f46598985ffa48b56b010feafcac3fa329bba Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 4 Apr 2018 14:53:53 -0400 Subject: [PATCH] :memo: Action. --- src/Semantic/Distribute.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Semantic/Distribute.hs b/src/Semantic/Distribute.hs index 257c3a3b1..41a6432be 100644 --- a/src/Semantic/Distribute.hs +++ b/src/Semantic/Distribute.hs @@ -40,6 +40,9 @@ parBitraversable :: Bitraversable t => Strategy a -> Strategy b -> Strategy (t a parBitraversable strat1 strat2 = bitraverse (rparWith strat1) (rparWith strat2) +-- | An action evaluating @task@s to some output in 'IO', or failing with an exception. +-- +-- This is necessary because GHC won’t allow us to use a rank-n quantified type in the third parameter to our instance of 'Run', below. newtype Action task = Action { runAction :: forall output . task output -> IO (Either SomeException output) } instance (Members '[Exc SomeException, IO] effects, Run effects result rest) => Run (Distribute task ': effects) result (Action task -> rest) where