Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.5k
    • Issues 5.5k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 628
    • Merge requests 628
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #414
Closed
Open
Issue created Jul 06, 2005 by Simon Peyton Jones@simonpjDeveloper

GHC does not eforce that Main exports main

The Haskell 98 report says "A Haskell program is a 
collection of
modules, one of which, by convention, must be called 
Main and must
export the value main." However, the program below 
builds and executes
fine.

module Main() -- should be "module Main" or "module 
Main(main)"
where
main = putStrLn "Hello, World"

$ runghc Main.hs
Hello, World

Originally reported by Brian Smith 
[brianlsmith@gmail.com]
Edited Mar 09, 2019 by Simon Marlow
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking