> ghc -c Add.hs
> ghc -c Main.hs
> ghc -o Main Main.o Add.o
Or just
ghc Add.hs Main.gs
But I agree. I always use hbcmake and it does what I want.
-- Lennart
> Add to this that the `Main' module must reside in a `Main' file and
> you have an unfortunate consequence that you can only have one `Main'
> function in each directory.
That's not so. Haskell doesn't say anything about what files
modules have to reside in. Some implementation may have the
re
I have another pet peeve: ease of use of tools.
The Haskell standard (intentionally?) leaves the interface to tools an
implementors question. Unfortunate, IMHO, every Haskell compiler I've
tried (GHC, NHC, HBC) have just had plain horrible interfaces.
Interpreters are inherently a different st
Jens' question gave my a perfect opportunity to open my a pet peeve of
mine: the ditatorship of `Main'.
In Haskell, the `main' function must reside in the `Main' module.
Add to this that the `Main' module must reside in a `Main' file and
you have an unfortunate consequence that you can only have
Dear Jens,
the problem is quite simple, but alas, the error message leaves much
to be disired: standalone Haskell program must contain a `main'
function in the `Main' module (thus the missing Main_main_closure
reference). Furthermore, this `main' function must have the type
signature `IO ()' (or
> I have written this small simple program
>
> module Add where
> add :: Int -> Int -> Int
> addx1 x2 x1 + x2
>
> I have create an object file with the command % ghc -c additon.hs
> Now I will create an executable file.
> What I have to do?
Well, where is your Main module? Haskell
--- Hugs update ---
Over the past few months, there have been a number of changes in the
Hugs world; the purpose of this message is to update you with details
of what is happening, and of our plans for the future.
The upcoming Hugs 98 release:
-
Tommy Thorn writes
| Jens' question gave my a perfect opportunity to open my a pet peeve of
| mine: the ditatorship of `Main'.
|
| In Haskell, the `main' function must reside in the `Main' module.
| Add to this that the `Main' module must reside in a `Main' file and
| you have an unfortunate con