Hi all,

The other day, I wrote the following program in /tmp/test.hs

--8<---------------cut here---------------start------------->8---
main = error "An Error message"
--8<---------------cut here---------------end--------------->8---

Then I ran the following:

,----
| gds@lithium:/tmp$ runghc ./test.hs `seq 1 100000`
| gds@lithium:/tmp$ ghc -o test test.hs
| gds@lithium:/tmp$ ./test `seq 1 100000`
| test: An Error message
| gds@lithium:/tmp$
`----

Notice that when I use runghc, my main function doesn't appear to run at
all. But when I run the compiled program, my main function does seem to
run, and produce the error message I expected.

It seems to me like runghc can't cope with that large a number of
arguments or size of argument string, or similar. That seems entirely
reasonable, but if so, then might it be a good idea to have an error
message when we accidentally hit that limit?

I'm using ghc 7.6.2 on Ubuntu 13.04.

Thanks!

Gareth.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to