mirror of
https://github.com/ilyakooo0/optparse-applicative.git
synced 2024-11-09 23:24:46 +03:00
Fix greet function in Hello example.
This commit is contained in:
parent
b92be315c9
commit
4bee34ad4f
@ -33,7 +33,7 @@ A parser can be used like this:
|
|||||||
|
|
||||||
```haskell
|
```haskell
|
||||||
greet :: Sample -> IO ()
|
greet :: Sample -> IO ()
|
||||||
greet (Sample h True) = putStrLn $ "Hello, " ++ h
|
greet (Sample h False) = putStrLn $ "Hello, " ++ h
|
||||||
greet _ = return ()
|
greet _ = return ()
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
@ -28,7 +28,7 @@ description:
|
|||||||
.
|
.
|
||||||
@
|
@
|
||||||
greet :: Sample -> IO ()
|
greet :: Sample -> IO ()
|
||||||
greet (Sample h True) = putStrLn $ \"Hello, \" ++ h
|
greet (Sample h False) = putStrLn $ \"Hello, \" ++ h
|
||||||
greet _ = return ()
|
greet _ = return ()
|
||||||
.
|
.
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
@ -18,7 +18,7 @@ sample = Sample
|
|||||||
& help "Whether to be quiet" )
|
& help "Whether to be quiet" )
|
||||||
|
|
||||||
greet :: Sample -> IO ()
|
greet :: Sample -> IO ()
|
||||||
greet (Sample h True) = putStrLn $ "Hello, " ++ h
|
greet (Sample h False) = putStrLn $ "Hello, " ++ h
|
||||||
greet _ = return ()
|
greet _ = return ()
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
Loading…
Reference in New Issue
Block a user