@@ -21,17 +21,22 @@
22module Stream.Exceptions (benchmarks) where
22module Stream.Exceptions (benchmarks) where
24−import Control.Exception (SomeException, Exception, throwIO)
24+import Control.Exception (Exception, throwIO)
25import Stream.Common (drain)
25import Stream.Common (drain)
26import Streamly.Internal.Data.Stream (Stream)
26import Streamly.Internal.Data.Stream (Stream)
27−import System.IO (Handle, hClose, hPutChar)
29import qualified Data.IORef as Ref
28import qualified Data.IORef as Ref
30import qualified Data.Map.Strict as Map
29import qualified Data.Map.Strict as Map
31import qualified Stream.Common as Common
30import qualified Stream.Common as Common
32+#ifndef USE_STREAMLY_CORE
33+import Control.Exception (SomeException)
34+import System.IO (Handle, hClose, hPutChar)
32import qualified Streamly.FileSystem.Handle as FH
35import qualified Streamly.FileSystem.Handle as FH
33−import qualified Streamly.Internal.Data.Unfold as IUF
34import qualified Streamly.Internal.FileSystem.Handle as IFH
36import qualified Streamly.Internal.FileSystem.Handle as IFH
37+import qualified Streamly.Internal.Data.Unfold as IUF
35#ifdef USE_PRELUDE
40#ifdef USE_PRELUDE
36import qualified Streamly.Internal.Data.Stream.IsStream as Stream
41import qualified Streamly.Internal.Data.Stream.IsStream as Stream
@@ -134,6 +139,9 @@ o_1_space_serial_exceptions length =
142+-- XXX Move these to FileSystem.Handle benchmarks
143+#ifndef USE_STREAMLY_CORE
137-------------------------------------------------------------------------------
145-------------------------------------------------------------------------------
138-- copy stream exceptions
146-- copy stream exceptions
139-------------------------------------------------------------------------------
147-------------------------------------------------------------------------------
@@ -323,12 +331,16 @@ o_1_space_copy_exceptions_toChunks env =
326benchmarks :: String -> BenchEnv -> Int -> [Benchmark]
336benchmarks :: String -> BenchEnv -> Int -> [Benchmark]
327−benchmarks moduleName env size =
337+benchmarks moduleName _env size =
328 [ bgroup (o_1_space_prefix moduleName) $ concat
338 [ bgroup (o_1_space_prefix moduleName) $ concat
339+ [ o_1_space_serial_exceptions size
340+#ifndef USE_STREAMLY_CORE
329− [ o_1_space_copy_exceptions_readChunks env
341+ , o_1_space_copy_exceptions_readChunks _env
330− , o_1_space_copy_exceptions_toChunks env
342+ , o_1_space_copy_exceptions_toChunks _env
331− , o_1_space_copy_stream_exceptions env
343+ , o_1_space_copy_stream_exceptions _env
332− , o_1_space_serial_exceptions size
344+#endif