
Hi, I'm very lame in Haskell and compiling is very new to me. I have this problem when compilng a program that runs without error: MACKIE:/Volumes/DADOS/LESI/4 Ano/SSDI lpx$ ghc polish.hs compilation IS NOT required /usr/bin/ld: Undefined symbols: _ZCMain_main_closure ___stginit_ZCMain collect2: ld returned 1 exit status Do i need to add extra parameters to ghc? I need to know or thing... I need to obtain the arguments of a haskell program and then treat those arguments as a list inside the program example: polish [(1,(2,3)),(2,(3,4)),(3,(5,6))] And then i want to have that list inside the program. How can i do that? For now i have the following code: main :: IO () main = do args <- getArgs print args Well, i hope someone can answer me these questions. Many thx, Nuno Santos

you could try ghc --make polish.hs Chris. On 18 May 2006, at 13:33, Nuno Santos wrote:
Hi,
I'm very lame in Haskell and compiling is very new to me.
I have this problem when compilng a program that runs without error:
MACKIE:/Volumes/DADOS/LESI/4 Ano/SSDI lpx$ ghc polish.hs compilation IS NOT required /usr/bin/ld: Undefined symbols: _ZCMain_main_closure ___stginit_ZCMain collect2: ld returned 1 exit status
Do i need to add extra parameters to ghc?
I need to know or thing...
I need to obtain the arguments of a haskell program and then treat those arguments as a list inside the program
example:
polish [(1,(2,3)),(2,(3,4)),(3,(5,6))]
And then i want to have that list inside the program.
How can i do that?
For now i have the following code:
main :: IO () main = do args <- getArgs print args
Well, i hope someone can answer me these questions.
Many thx,
Nuno Santos _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Hi Christopher, Thx for the reply. Yes it work withtou problems, but when i try to execute the .o it says no permissions. I change to executable whith chmod +x polish.o and then it says me bad executable. I also tried to do ghc -o polish polish.o It gives me then the error i was complaing of. What i'm doing wrong? Or not doing at all? Many thx Nuno Christopher Brown wrote:
you could try
ghc --make polish.hs
Chris.
On 18 May 2006, at 13:33, Nuno Santos wrote:
Hi,
I'm very lame in Haskell and compiling is very new to me.
I have this problem when compilng a program that runs without error:
MACKIE:/Volumes/DADOS/LESI/4 Ano/SSDI lpx$ ghc polish.hs compilation IS NOT required /usr/bin/ld: Undefined symbols: _ZCMain_main_closure ___stginit_ZCMain collect2: ld returned 1 exit status
Do i need to add extra parameters to ghc?
I need to know or thing...
I need to obtain the arguments of a haskell program and then treat those arguments as a list inside the program
example:
polish [(1,(2,3)),(2,(3,4)),(3,(5,6))]
And then i want to have that list inside the program.
How can i do that?
For now i have the following code:
main :: IO () main = do args <- getArgs print args
Well, i hope someone can answer me these questions.
Many thx,
Nuno Santos _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Nuno Santos wrote:
Thx for the reply. Yes it work withtou problems, but when i try to execute the .o it says no permissions.
The executable is called "a.out" (under unix)
I also tried to do ghc -o polish polish.o
It gives me then the error i was complaing of.
then ghc --make -o polish polish.hs should give you a binary "polish" Cheers Christian
Christopher Brown wrote:
you could try
ghc --make polish.hs

Hi Nuno Why are you trying to run the .o file? To my knowledge that is a binary library, and not an executable. Surely GHC produces an executable, it might be called "a.out" in this case. If it has just run ./a.out Chris. On 18 May 2006, at 14:53, Nuno Santos wrote:
Hi Christopher,
Thx for the reply. Yes it work withtou problems, but when i try to execute the .o it says no permissions.
I change to executable whith chmod +x polish.o and then it says me bad executable.
I also tried to do ghc -o polish polish.o
It gives me then the error i was complaing of.
What i'm doing wrong? Or not doing at all?
Many thx
Nuno
Christopher Brown wrote:
you could try
ghc --make polish.hs
Chris.
On 18 May 2006, at 13:33, Nuno Santos wrote:
Hi,
I'm very lame in Haskell and compiling is very new to me.
I have this problem when compilng a program that runs without error:
MACKIE:/Volumes/DADOS/LESI/4 Ano/SSDI lpx$ ghc polish.hs compilation IS NOT required /usr/bin/ld: Undefined symbols: _ZCMain_main_closure ___stginit_ZCMain collect2: ld returned 1 exit status
Do i need to add extra parameters to ghc?
I need to know or thing...
I need to obtain the arguments of a haskell program and then treat those arguments as a list inside the program
example:
polish [(1,(2,3)),(2,(3,4)),(3,(5,6))]
And then i want to have that list inside the program.
How can i do that?
For now i have the following code:
main :: IO () main = do args <- getArgs print args
Well, i hope someone can answer me these questions.
Many thx,
Nuno Santos _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (3)
-
Christian Maeder
-
Christopher Brown
-
Nuno Santos