Skip to content

Commit c671a01

Browse files
committed
Add index entry for GHC-67120
1 parent f5875a9 commit c671a01

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module Main where
2+
3+
-- Insert the fixed example here.
4+
5+
main :: IO ()
6+
main = putStrLn "Hello, World!"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module Main where
2+
3+
-- Insert the example containing a bug here.
4+
5+
notMain :: IO ()
6+
notMain = putStrLn "Hello, World!"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
title: <insert a title for this example here>
3+
---
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Missing main
3+
summary: Missing main action
4+
severity: error
5+
introduced: 9.6.1
6+
---
7+
8+
According to the second paragraph of Chapter 5 of The Haskell 98 Report,
9+
> A Haskell program is a collection of modules, one of which, by convention, must be called Main and must export the value main. The value of the program is the value of the identifier main in module Main, which must be a computation of type IO t for some type t (see Chapter 7). When the program is executed, the computation main is performed, and its result (of type t) is discarded.
10+
11+
## Example error text
12+
```
13+
error: [GHC-67120]
14+
The IO action ‘main’ is not defined in module ‘Main’
15+
|
16+
1 | module Main where
17+
| ^
18+
```

0 commit comments

Comments
 (0)