Ticket #2167 (closed bug: duplicate)

Opened 5 years ago

Last modified 5 years ago

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: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by igloo) (diff)

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:

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

Change History

Changed 5 years ago by igloo

  • difficulty set to Unknown
  • description modified (diff)

Changed 5 years ago by igloo

  • status changed from new to closed
  • resolution set to duplicate

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.