logo       

[ ghc-Bugs-686620 ] ghc --make -no-hs-main -o fails: msg#00059

lang.haskell.glasgow.bugs

Subject: [ ghc-Bugs-686620 ] ghc --make -no-hs-main -o fails

Bugs item #686620, was opened at 2003-02-14 16:34
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=686620&group_id=8032

Category: Driver
Group: 5.04.2
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Martin Norbäck (norpan)
Assigned to: Nobody/Anonymous (nobody)
Summary: ghc --make -no-hs-main -o fails

Initial Comment:
This is a very special case, I admit, but anyway:

I use

ghc --make -no-hs-main Haskell.hs c.o -o program

to link a program, where c.o is a c object file
defining main, and it calls functions in Haskell.hs. I
want it to link correctly. However ghc complains:

Warning: output was redirected with -o, but no output
will be generated because there is no Main module.

This is even though there is the flag -no-hs-main.

If i create a dummy Main module like this:

module Main where
import Haskell
main = undefined

and do

ghc --make -no-hs-main Main.hs c.o -o program

the program compiles and work fine.

Since there is this workaround I don't think it's a
serious bug, because it's a rare case, but I thought
you'd want to know anyway.



----------------------------------------------------------------------

>Comment By: Simon Marlow (simonmar)
Date: 2003-02-19 12:01

Message:
Logged In: YES
user_id=48280

Fixed, thanks.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=686620&group_id=8032


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise