diff --git a/package.yaml b/package.yaml index d0c96290a..c737b1fbd 100644 --- a/package.yaml +++ b/package.yaml @@ -58,7 +58,7 @@ dependencies: - directory - extra - primitive - #- streaming +- streaming #- repa - monad-parallel - parallel diff --git a/src/Shape/Data.hs b/src/Shape/Data.hs index 00720b60e..f36b10be9 100644 --- a/src/Shape/Data.hs +++ b/src/Shape/Data.hs @@ -12,7 +12,7 @@ import Control.Lens import Data.Aeson import Data.Aeson.TH import Geometry.Data -import Streaming +--import Streaming {-# INLINE shVfromList #-} @@ -45,7 +45,7 @@ pairToSV = uncurry ShapeV makeLenses ''ShapeV makeLenses ''ShapeObj -type Shape' = Stream (Of ShapeObj) IO () +--type Shape' = Stream (Of ShapeObj) IO () type Shape = [ShapeObj] diff --git a/src/Sound.hs b/src/Sound.hs index 0fa3a39a7..1a97faebe 100644 --- a/src/Sound.hs +++ b/src/Sound.hs @@ -26,7 +26,7 @@ import qualified SDL.Mixer as Mix import Data.Maybe import qualified IntMapHelp as IM import qualified Data.Map as M -import qualified Streaming.Prelude as S +--import qualified Streaming.Prelude as S import Control.Monad import Control.Monad.Trans import Control.Monad.Trans.Maybe @@ -140,9 +140,8 @@ playIfFree c times = do As for 'playSoundQueue', but with positional information in the form of an Int16. -} playPositionalSoundQueue :: IM.IntMap Mix.Chunk -> [(Int,Int16)] -> IO () playPositionalSoundQueue chunkMap - = S.mapM_ ( \(n,a) -> + = mapM_ ( \(n,a) -> runMaybeT $ playIfFree (chunkMap IM.! n) Mix.Once >>= setChannelPos a ) - . S.each setChannelPos :: Int16 -> Mix.Channel -> MaybeT IO Mix.Channel setChannelPos a i = do