added error message
This commit is contained in:
2
Main.hs
2
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 <file.csv> <threshold>")
|
||||
let filename = head args
|
||||
let threshold = read $ last args
|
||||
file <- readFile filename
|
||||
|
||||
Reference in New Issue
Block a user