Skip to content

Commit e9c9d88

Browse files
committed
Capitalize if-then-else as other page does it
1 parent 02862ea commit e9c9d88

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

message-index/messages/GHC-01239/example1/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Unexpected if expression in function application
33
---
44

5-
To pass if-then-else expressions as function argument we either have to surround it in parentheses,
5+
To pass If-Then-Else expressions as function argument we either have to surround it in parentheses,
66
use function application operator `($)` or enable [`BlockArguments`](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/block_arguments.html#extension-BlockArguments) extension.
77

88
## Error Message

message-index/messages/GHC-01239/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ severity: error
55
introduced: TODO
66
---
77

8-
Unlike in many other languages, in Haskell the if-then-else construct is an expression, which means it returns a value that can be processed further.
8+
Unlike in many other languages, in Haskell the If-Then-Else construct is an expression, which means it returns a value that can be processed further.
99

10-
```language-haskell
10+
```haskell
1111
ageMessage :: Int -> String
1212
ageMessage age = if age < 18 then "You are too young to enter" else "Welcome to the club"
1313

1414
putStrLn (ageMessage 10) -- You are too young to enter
1515
putStrLn (ageMessage 20) -- Welcome to the club
1616
```
1717

18-
Thinking of if-then-else expression as a value, we might want to pass it as an input to a function.
18+
Thinking of If-Then-Else expression as a value, we might want to pass it as an input to a function.
1919
If you do that you can run into the following error.

0 commit comments

Comments
 (0)