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 0c7ffb4 commit 65fa896Copy full SHA for 65fa896
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