Fix greet function in Hello example.

This commit is contained in:
Paolo Capriotti 2012-06-11 22:42:45 +01:00
parent b92be315c9
commit 4bee34ad4f
3 changed files with 3 additions and 3 deletions

View File

@ -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 ()

View File

@ -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 ()

View File

@ -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 ()