Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Software
Mock
Commits
517bc032
Commit
517bc032
authored
Nov 22, 2018
by
Nicolas Lenz
Browse files
Enable reading from stdin when no text is given on cli
parent
fe36604f
Changes
1
Show whitespace changes
Inline
Side-by-side
app/Main.hs
View file @
517bc032
...
@@ -12,7 +12,7 @@ main = do
...
@@ -12,7 +12,7 @@ main = do
args
<-
getArgs
args
<-
getArgs
case
length
args
of
case
length
args
of
0
->
putStrLn
help
0
->
putStrLn
help
1
->
putStrLn
help
-- TODO: read from stdin
1
->
getLine
>>=
(
\
text
->
handle
[
head
args
,
text
])
_
->
handle
args
_
->
handle
args
handle
::
[
String
]
->
IO
()
handle
::
[
String
]
->
IO
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment