diff options
Diffstat (limited to 'packages/base/src/Internal/Element.hs')
-rw-r--r-- | packages/base/src/Internal/Element.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/base/src/Internal/Element.hs b/packages/base/src/Internal/Element.hs index 55bff67..4007491 100644 --- a/packages/base/src/Internal/Element.hs +++ b/packages/base/src/Internal/Element.hs | |||
@@ -30,6 +30,7 @@ import Text.Printf | |||
30 | import Data.List(transpose,intersperse) | 30 | import Data.List(transpose,intersperse) |
31 | import Data.List.Split(chunksOf) | 31 | import Data.List.Split(chunksOf) |
32 | import Foreign.Storable(Storable) | 32 | import Foreign.Storable(Storable) |
33 | import System.IO.Unsafe(unsafePerformIO) | ||
33 | import Control.Monad(liftM) | 34 | import Control.Monad(liftM) |
34 | 35 | ||
35 | ------------------------------------------------------------------- | 36 | ------------------------------------------------------------------- |
@@ -147,7 +148,7 @@ m ?? (e, TakeLast n) = m ?? (e, Drop (cols m - n)) | |||
147 | m ?? (DropLast n, e) = m ?? (Take (rows m - n), e) | 148 | m ?? (DropLast n, e) = m ?? (Take (rows m - n), e) |
148 | m ?? (e, DropLast n) = m ?? (e, Take (cols m - n)) | 149 | m ?? (e, DropLast n) = m ?? (e, Take (cols m - n)) |
149 | 150 | ||
150 | m ?? (er,ec) = extractR m moder rs modec cs | 151 | m ?? (er,ec) = unsafePerformIO $ extractR m moder rs modec cs |
151 | where | 152 | where |
152 | (moder,rs) = mkExt (rows m) er | 153 | (moder,rs) = mkExt (rows m) er |
153 | (modec,cs) = mkExt (cols m) ec | 154 | (modec,cs) = mkExt (cols m) ec |