@@ -21,17 +21,22 @@
2121
2222module Stream.Exceptions (benchmarks) where
2323
24−import Control.Exception (SomeException, Exception, throwIO)
24+import Control.Exception (Exception, throwIO)
2525import Stream.Common (drain)
2626import Streamly.Internal.Data.Stream (Stream)
27−import System.IO (Handle, hClose, hPutChar)
2827
2928import qualified Data.IORef as Ref
3029import qualified Data.Map.Strict as Map
3130import qualified Stream.Common as Common
31+
32+#ifndef USE_STREAMLY_CORE
33+import Control.Exception (SomeException)
34+import System.IO (Handle, hClose, hPutChar)
3235import qualified Streamly.FileSystem.Handle as FH
33−import qualified Streamly.Internal.Data.Unfold as IUF
3436import qualified Streamly.Internal.FileSystem.Handle as IFH
37+import qualified Streamly.Internal.Data.Unfold as IUF
38+#endif
39+
3540#ifdef USE_PRELUDE
3641import qualified Streamly.Internal.Data.Stream.IsStream as Stream
3742#else
@@ -134,6 +139,9 @@ o_1_space_serial_exceptions length =
134139 ]
135140 ]
136141
142+-- XXX Move these to FileSystem.Handle benchmarks
143+#ifndef USE_STREAMLY_CORE
144+
137145-------------------------------------------------------------------------------
138146-- copy stream exceptions
139147-------------------------------------------------------------------------------
@@ -323,12 +331,16 @@ o_1_space_copy_exceptions_toChunks env =
323331 ]
324332 ]
325333
334+#endif
335+
326336benchmarks :: String -> BenchEnv -> Int -> [Benchmark]
327−benchmarks moduleName env size =
337+benchmarks moduleName _env size =
328338 [ bgroup (o_1_space_prefix moduleName) $ concat
329− [ o_1_space_copy_exceptions_readChunks env
330− , o_1_space_copy_exceptions_toChunks env
331− , o_1_space_copy_stream_exceptions env
332− , o_1_space_serial_exceptions size
339+ [ o_1_space_serial_exceptions size
340+#ifndef USE_STREAMLY_CORE
341+ , o_1_space_copy_exceptions_readChunks _env
342+ , o_1_space_copy_exceptions_toChunks _env
343+ , o_1_space_copy_stream_exceptions _env
344+#endif
333345 ]
334346 ]