
it really was an indentation error
i configured my editor to expand tabs into spaces but somehow he did a real
tab on line 9 and 10
thank you
2009/6/16 Daniel Fischer
Am Dienstag 16 Juni 2009 22:35:17 schrieb Nico Rolle:
Hi
Heres my code snippet. It reports that my error is in line 9 right after the main definition. All functions that i call work under normal circumstances. Thanks
Must be the indentation, probably the xs is indented further than the following line (though that's not the case for the code copy-pasted from the mail to an editor).
But note that this will most likely print out 0 twice. The let pnp = ... bindings don't cause any computation to occur. To measure the time the computations take, you must force them to occur between the two calls to getCurrentTime.
module Benchmark where
import ReadCSV import Operators import Data.Time.Clock (diffUTCTime, getCurrentTime)
main = do xs <- readCSV "dataconvert/lineitem.tbl" '|' start <- getCurrentTime let pnp = projection [5] xs let snp = selection (\x -> (x!!0) > (Int 17000)) pnp end <- getCurrentTime putStrLn $ show (end `diffUTCTime` start) start2 <- getCurrentTime let pp = pProjection [5] xs let sp = pSelection (\x -> (x!!0) > (Int 17000)) pp end2 <- getCurrentTime putStrLn $ show (end2 `diffUTCTime` start2) return xs
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners