Opened 10 years ago

Closed 10 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: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

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 10 years ago by igloo

Description: modified (diff)
difficulty: Unknown

comment:2 Changed 10 years ago by igloo

Resolution: duplicate
Status: newclosed

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.