added error messages

This commit is contained in:
IGI-111
2015-04-03 23:24:46 +02:00
parent 6009448971
commit ee984a685d

View File

@@ -14,6 +14,6 @@ main = do
let threshold = read $ last args let threshold = read $ last args
file <- readFile filename file <- readFile filename
case parseCSV file of case parseCSV file of
Left _ -> putStrLn "Could not parse out.csv" Left _ -> error "Could not parse out.csv"
Right val -> mapM_ (\x -> putStrLn (show x ++ "(" ++ show (count table x) ++ ")")) (concat (frequentPatterns threshold table)) where Right val -> mapM_ (\x -> putStrLn (show x ++ "(" ++ show (count table x) ++ ")")) (concat (frequentPatterns threshold table)) where
table = map (ItemSet. Set.fromList .map Item) val table = map (ItemSet. Set.fromList .map Item) val