From 60094489716367b51bf64bfbeb39b0b9c87adfe1 Mon Sep 17 00:00:00 2001 From: IGI-111 Date: Fri, 3 Apr 2015 23:23:34 +0200 Subject: [PATCH] added error message --- Main.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Main.hs b/Main.hs index 578094f..170544f 100644 --- a/Main.hs +++ b/Main.hs @@ -4,10 +4,12 @@ import CSVParser import Apriori import qualified Data.Set as Set import System.Environment (getArgs) +import Control.Monad main :: IO() main = do args <- getArgs + when (2 /= length args) (error "Usage: Main ") let filename = head args let threshold = read $ last args file <- readFile filename