Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,323
    • Issues 4,323
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 361
    • Merge Requests 361
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #414

Closed
Open
Opened 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
Assignee
Assign to
6.12.2
Milestone
6.12.2
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#414