
#12906: GHC fails to typecheck Main module without main -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by osa1): I tried this module using 8.0, 7.10 and 7.8 and they all failed with the same error message: {{{#!haskell module Main where x :: String -> String x s = print (reverse s + 1) }}} {{{
t12906 /home/omer/ghc_bins/ghc-8.0.1/bin/ghc test [1 of 1] Compiling Main ( test.hs, test.o )
test.hs:1:1: error: The IO action ‘main’ is not defined in module ‘Main’
t12906 /home/omer/ghc_bins/ghc-7.10.1/bin/ghc test [1 of 1] Compiling Main ( test.hs, test.o )
test.hs:1:1: The IO action ‘main’ is not defined in module ‘Main’
t12906 /home/omer/ghc_bins/ghc-7.8.1/bin/ghc test [1 of 1] Compiling Main ( test.hs, test.o )
test.hs:1:1: The IO action ‘main’ is not defined in module ‘Main’ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12906#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler