Skip to content

Commit

Permalink
Add index entry for GHC-67120
Browse files Browse the repository at this point in the history
  • Loading branch information
jllang committed Jun 9, 2024
1 parent f5875a9 commit 4bc87a6
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions message-index/messages/GHC-67120/example1/after/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module Main where

-- Insert the fixed example here.

main :: IO ()
main = putStrLn "Hello, World!"
6 changes: 6 additions & 0 deletions message-index/messages/GHC-67120/example1/before/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module Main where

-- Insert the example containing a bug here.

notMain :: IO ()
notMain = putStrLn "Hello, World!"
3 changes: 3 additions & 0 deletions message-index/messages/GHC-67120/example1/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: <insert a title for this example here>
---
18 changes: 18 additions & 0 deletions message-index/messages/GHC-67120/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Missing main
summary: Missing main action
severity: error
introduced: 9.8.1
---

According to the second paragraph of Chapter 5 of The Haskell 98 Report,
> 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.
## Example error text
```
error: [GHC-67120]
The IO action ‘main’ is not defined in module ‘Main’
|
1 | module Main where
| ^
```

0 comments on commit 4bc87a6

Please sign in to comment.