Opened 8 years ago

Closed 8 years ago

#2167 closed bug (duplicate)

The -main-is option to runghc does not appear to work.

Reported by: cjs Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.8.2
Keywords: Cc:
Operating System: NetBSD Architecture: x86
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):

Description (last modified by igloo)

The -main-is option to runghc does not appear to work, at least not when specifying a package name. Create Hello.hs:

    module Hello where
    main = putStrLn "Hello."

and then try to run it:

    runghc -main-is Hello Hello.hs

You will see:

        Failed to load interface for `Main':
          Use -v to see a list of the files searched for.

Change History (2)

comment:1 Changed 8 years ago by igloo

  • Description modified (diff)
  • difficulty set to Unknown

comment:2 Changed 8 years ago by igloo

  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for the report. Happily, this has already been fixed (see #1312), although note that you need to escape Hello:

runghc -main-is --ghc-arg=Hello Hello.hs
Note: See TracTickets for help on using tickets.