-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add index entries for GHC-67120, GHC-89246, and GHC-94803 #517
base: main
Are you sure you want to change the base?
Conversation
introduced: 9.8.1 | ||
--- | ||
|
||
According to the second paragraph of Chapter 5 of The Haskell 98 Report, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the second paragraph of Chapter 5 of The Haskell 98 Report, | |
According to the second paragraph of Chapter 5 of [The Haskell 2010 Report](https://www.haskell.org/onlinereport/haskell2010/haskellch5.html#x11-980005), |
--- | ||
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> 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. | |
> 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. |
@@ -0,0 +1,3 @@ | |||
--- | |||
title: <insert a title for this example here> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please fill the title?
@@ -0,0 +1,6 @@ | |||
module Main where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My experience is that it's far more common reason for GHC-67120 that you meant to write a library exporting notMain
, in which case the solution is to rename module Main
to module Lib
or anything.
What contributes to the problem is that GHC would assume module Main where
implicitly unless there is module
declaration.
Probably worth adding another example or at least discussing this case in index.md
.
No description provided.