@@ -19,7 +19,7 @@ module Asyncly.Core
1919 ( Stream (..)
2020 , MonadAsync
2121 , Streaming (..)
22− , ContextUsedAfterEOF (..)
22+ , EndOfStream (..)
2323
2424 -- * Running the Monad
2525 , runStreaming
@@ -304,8 +304,8 @@ sendWorkerWait ctx = do
304304 else void (liftIO $ takeMVar (doorBell ctx))
305305
306306-- | An 'async' stream has finished but is still being used.
307−data ContextUsedAfterEOF = ContextUsedAfterEOF deriving Show
308−instance Exception ContextUsedAfterEOF
307+data EndOfStream = EndOfStream deriving Show
308+instance Exception EndOfStream
309309
310310-- | Pull a stream from a context
311311{-# NOINLINE pullFromCtx #-}
@@ -317,7 +317,7 @@ pullFromCtx ctx = Stream $ \_ stp yld -> do
317317 -- XXX if reading the IORef is costly we can use a flag in the context to
318318 -- indicate we are done.
319319 done <- allThreadsDone ctx
320− when done $ throwM ContextUsedAfterEOF
320+ when done $ throwM EndOfStream
321321
322322 res <- liftIO $ tryTakeMVar (doorBell ctx)
323323 when (isNothing res) $ sendWorkerWait ctx