[Haskell-beginners] Compiling Test.hs from reactive-fieldtrip
byorgey at seas.upenn.edu
Wed Jun 9 02:41:19 EDT 2010
The .hs isn't necessary either. Here's the real answer: you simply
need to add a -main-is flag to tell ghc that the module containing
'main' is not called 'Main'. So:
ghc --make Test -main-is Test
should do the trick.
On Wed, Jun 09, 2010 at 03:47:55PM +1200, Stephen Blackheath [to Haskell-Beginners] wrote:
> You must put the .hs on the input filename, but the '-o Test' isn't
> necessary. So you can type
> ghc --make Test.hs
> I took a look at this file, and the module name is 'Test'. If you
> change it to 'Main' it should work. I think this requirement was
> tightened up in newer versions of ghc.
> On 09/06/10 15:36, Nathan Huesken wrote:
> > Hey,
> > Thank you for the answer. Now I get:
> > ghc --make Test -o Test
> > Warning: output was redirected with -o, but no output will be
> > generated because there is no Main module.
> > How am I supposed to comple this file?
> > On Tue, 8 Jun 2010 21:55:38 -0500
> > aditya siram <aditya.siram at gmail.com> wrote:
> >> To compile an executable, tack on -o <executable_name>, so for
> >> instance, ghc --make HelloWorld.hs -o HelloWorld
> >> creates an executable called `HelloWorld'.
> >> -deech
> >> On 6/8/10, Nathan Huesken <haskell at lonely-star.org> wrote:
> >>> Hi,
> >>> I am trying to compile the Test.hs form reactive-fieltrip.
> >>> I did:
> >>> ghc --make
> >>> Test
> >>> (22:09) [1 of 3] Compiling FRP.Reactive.FieldTrip.Adapter
> >>> ( FRP/Reactive/FieldTrip/Adapter.hs,
> >>> FRP/Reactive/FieldTrip/Adapter.o ) [2 of 3] Compiling
> >>> FRP.Reactive.FieldTrip ( FRP/Reactive/FieldTrip.hs,
> >>> FRP/Reactive/FieldTrip.o ) [3 of 3] Compiling Test ( Test.hs,
> >>> Test.o )
> >>> Wonderfull, only it is not giving me an executable, only Test.o.
> >>> It has a main function, so how can I compile it?
> >>> Thanks!
> >>> nathan
> >>> _______________________________________________
> >>> Beginners mailing list
> >>> Beginners at haskell.org
> >>> http://www.haskell.org/mailman/listinfo/beginners
> > _______________________________________________
> > Beginners mailing list
> > Beginners at haskell.org
> > http://www.haskell.org/mailman/listinfo/beginners
> Beginners mailing list
> Beginners at haskell.org
More information about the Beginners