Skip to content

Commit

Permalink
Disabled experimental generateM and related due to #24
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Kuleshevich committed Jul 5, 2018
1 parent f508684 commit 8216a0d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion massiv/massiv.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ test-suite tests
main-is: Spec.hs
other-modules: Data.Massiv.Array.DelayedSpec
, Data.Massiv.Array.Manifest.VectorSpec
, Data.Massiv.Array.MutableSpec
--, Data.Massiv.Array.MutableSpec
, Data.Massiv.Array.Ops.ConstructSpec
, Data.Massiv.Array.Ops.FoldSpec
, Data.Massiv.Array.Ops.SliceSpec
Expand Down
18 changes: 12 additions & 6 deletions massiv/src/Data/Massiv/Array/Mutable.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ module Data.Massiv.Array.Mutable
-- * Generate (experimental)

-- $generate
, generateM
{-, generateM
, generateLinearM
, mapM
, imapM
, forM
, iforM
, sequenceM
, sequenceM -}
) where

import Prelude hiding (mapM, read)
Expand All @@ -51,7 +51,7 @@ import Control.Monad.Primitive (PrimMonad (..))
import Data.Massiv.Array.Manifest.Internal
import Data.Massiv.Array.Unsafe
import Data.Massiv.Core.Common
import GHC.Base (Int (..))
--import GHC.Base (Int (..))
import GHC.Prim

-- errorSizeMismatch fName sz1 sz2 =
Expand Down Expand Up @@ -174,7 +174,7 @@ swap' marr ix1 ix2 = do
else ix1
{-# INLINE swap' #-}


{-
unsafeLinearFillM :: (Mutable r ix e, Monad m) =>
MArray RealWorld r ix e -> (Int -> m e) -> WorldState -> m WorldState
unsafeLinearFillM ma f (State s_#) = go 0# s_#
Expand Down Expand Up @@ -273,11 +273,17 @@ sequenceM
r' -> Array r ix (m e) -> m (Array r' ix e)
sequenceM r = mapM r id
{-# INLINE sequenceM #-}

-}

{- $generate
Functions in this sections can monadically generate manifest arrays using their associated mutable
Functions in this section has been removed until better times due to a known bug https://github.com/lehins/massiv/issues/24
-}

{-
Functions in this section can monadically generate manifest arrays using their associated mutable
interface. Due to the sequential nature of monads generation is done also sequentially regardless of
supplied computation strategy. All of functions here are very much experimental, so please
<https://github.com/lehins/massiv/issues/new report an issue> if you see something not working
Expand Down
4 changes: 2 additions & 2 deletions massiv/tests/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Main where

import Data.Massiv.Array.DelayedSpec as Delayed
import Data.Massiv.Array.Manifest.VectorSpec as Vector
import Data.Massiv.Array.MutableSpec as Mutable
--import Data.Massiv.Array.MutableSpec as Mutable
import Data.Massiv.Array.Ops.ConstructSpec as Construct
import Data.Massiv.Array.Ops.FoldSpec as Fold
import Data.Massiv.Array.Ops.SliceSpec as Slice
Expand All @@ -29,6 +29,6 @@ main = do
Slice.spec
Transform.spec
describe "Delayed" $ Delayed.spec
describe "Mutable" $ Mutable.spec
--describe "Mutable" $ Mutable.spec
describe "Stencil" $ Stencil.spec
describe "Vector" $ Vector.spec

0 comments on commit 8216a0d

Please sign in to comment.