We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4f2c2d commit 3670d6aCopy full SHA for 3670d6a
app/Main.hs
@@ -6,11 +6,8 @@ import System.Environment (getArgs)
6
main :: IO ()
7
main = do
8
args <- getArgs
9
- if length args /= 1
10
- then do
11
- putStrLn "Usage: <file>"
12
- else do
13
- let file = head args
+ case args of
+ [file] -> do
14
isRecFile <- isRecordingFile file
15
if not isRecFile
16
then do
@@ -21,3 +18,4 @@ main = do
21
18
RecordingReturnError err -> putStrLn $ "An error occurred: " ++ err
22
19
RecordingReturnSuccess information -> print information
23
20
return ()
+ _ -> putStrLn "Usage: <file>"
0 commit comments