[GHC] #7816: "main function" is not a function

#7816: "main function" is not a function ----------------------------------------------+----------------------------- Reporter: monoidal | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.6.2 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Incorrect warning at compile-time | Blockedby: Blocking: | Related: ----------------------------------------------+----------------------------- A module without main gives an error: {{{ A.hs:1:1: The function ‛main’ is not defined in module ‛Main’ }}} However, main in Haskell is not a function. This is often a cause of misunderstandings, for example see [http://ircbrowse.net/browse/haskell?q=main+not+function IRC discussions] or [http://conal.net/blog/posts/everything-is-a-function-in-haskell Conal Elliott's "Everything is a function in Haskell"]. I suggest changing this to: {{{ A.hs:1.1: The IO action ‛main’ is not defined in module ‛Main’ }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7816 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7816: "main function" is not a function ----------------------------------------------+----------------------------- Reporter: monoidal | Owner: Type: bug | Status: patch Priority: normal | Component: Compiler Version: 7.6.2 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Incorrect warning at compile-time | Blockedby: Blocking: | Related: ----------------------------------------------+----------------------------- Changes (by monoidal): * status: new => patch -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7816#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7816: "main function" is not a function ---------------------------------+------------------------------------------ Reporter: monoidal | Owner: Type: bug | Status: patch Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.6.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Incorrect warning at compile-time Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by igloo): * difficulty: => Unknown * milestone: => 7.8.1 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7816#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7816: "main function" is not a function
---------------------------------+------------------------------------------
Reporter: monoidal | Owner:
Type: bug | Status: patch
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.6.2
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Incorrect warning at compile-time
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by simonpj@…):
commit d6ceeaac137c3f4f2f23d244f395d7cdf5439397
{{{
Author: Simon Peyton Jones

#7816: "main function" is not a function
---------------------------------+------------------------------------------
Reporter: monoidal | Owner:
Type: bug | Status: patch
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.6.2
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Incorrect warning at compile-time
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by simonpj):
Plus
{{{
commit 58e4f8380cd18c36be087ac1064aa3cffd9b6b24
Author: Simon Peyton Jones

#7816: "main function" is not a function ------------------------------------------------+--------------------------- Reporter: monoidal | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.6.2 Resolution: fixed | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Incorrect warning at compile-time | Difficulty: Unknown Testcase: | Blockedby: Blocking: | Related: ------------------------------------------------+--------------------------- Changes (by simonpj): * status: patch => closed * resolution: => fixed Comment: OK done; thanks for the suggestion. Simon -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7816#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC