progs/haskell/re.hs
changeset 359 fedc16924b76
parent 156 6a43ea9305ba
--- a/progs/haskell/re.hs	Wed Sep 18 16:35:57 2019 +0100
+++ b/progs/haskell/re.hs	Sat Oct 24 12:13:39 2020 +0100
@@ -3,8 +3,9 @@
 import Text.Printf
 import Control.Exception
 import System.CPUTime
-import Control.Parallel.Strategies
+--import Control.Parallel.Strategies
 import Control.Monad
+import Control.DeepSeq
 
 lim :: Int
 lim = 1
@@ -15,7 +16,7 @@
     start <- getCPUTime
     replicateM_ lim $ do
         x <- evaluate $ 1 + y
-        rdeepseq x `seq` return ()
+        deepseq x `seq` return ()
     end   <- getCPUTime
     let diff = (fromIntegral (end - start)) / (10^12)
     printf "%0.9f\n" (diff :: Double)
@@ -245,7 +246,7 @@
              (_, ZERO)  -> (ZERO, f_id)
              (ONE, _) -> (r2s, f_seq_void1 f1d f2s)
              (_, ONE) -> (r1d, f_seq_void2 f1d f2s)
-             (_, _) -> (SEQ r1d r2s, f_seq f1d f2s))	  
+             (_, _) -> (SEQ r1d r2s, f_seq f1d f2s))
     STAR r1 -> 
       let (r1d, f1d) = der_simp c r1 
       in