blob: 90dfb2326918043e216adb07694f1f354e758e90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
diff --git a/src/Flower.hs b/src/Flower.hs
index fca5814..9424222 100644
--- a/src/Flower.hs
+++ b/src/Flower.hs
@@ -25,6 +25,7 @@ import qualified Data.ByteString.Lazy as L1
import Data.Array.Unboxed
import Data.Array.ST
+import qualified Data.Array.Unsafe as U
import Control.Monad.ST
import Control.Monad.State
@@ -238,10 +239,10 @@ histogram fl scores = runST $ do
ins1 (x,_) = error ("Illegal character "++show x++" in flow!")
bump ar i = readArray ar i >>= \x -> writeArray ar i (x+1)
mapM_ ins1 (zip (cycle fl) (map (\x->if x>9999 || x<0 then 9999 else x) $ concat scores))
- a' <- unsafeFreeze a
- c' <- unsafeFreeze c
- g' <- unsafeFreeze g
- t' <- unsafeFreeze t
+ a' <- U.unsafeFreeze a
+ c' <- U.unsafeFreeze c
+ g' <- U.unsafeFreeze g
+ t' <- U.unsafeFreeze t
return (a',c',g',t')
showHist :: (Hist,Hist,Hist,Hist) -> String
|