[Haskell-beginners] ghci reports "The last statement in a 'do' construct must be an expression" error

Nico Rolle nrolle at web.de
Tue Jun 16 16:35:17 EDT 2009


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


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


More information about the Beginners mailing list