RE: Run-time options in ghc on Linux

2002-12-20 Thread Simon Marlow

 The +RTS options don't seem to be working for me on Linux 
 (Redhat 7.2, ghc 5.04 and 5.04.1 installed via the .rpms).  
 
 One of my programs will happily consume all available memory, 
 even though I have +RTS -M64M, and another program fails with
 
 Stack space overflow: current size 1048576 bytes.
 Use `+RTS -Ksize' to increase it.
 
 even though I'm using +RTS -K10M.

Well, it works here...  if you say +RTS -? does it print the help
text?  Could you post the exact command lines you're using to
compile/link the program, and the command line used to run it?

Cheers,
Simon
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



ext-core Questions

2002-12-20 Thread Ingo Wechsung
Dear GH Users,

I have been using the -fext-core option to generate *.hcr Files. I've also
read the document An External Representationfor the Core Language.

There are still some things that confuse me.

Firstly, it seems, that Tuples are sometimes represented for example  for
(a,b) as DataziTuple.Z2T (a) (b) and in other cases as GHCziPrim.Z2H (a)
(b). Why is this?

Secondly, in GHC produced Core programs, one sees frequently references to
intermediate values from other Modules such as SystemziIO.lvl (print
newline?) or GHCziNum.lvl1 (which seems to be an Integer constant) or even
GHCziNum.a4 (which seems to be () :: Integer - Integer - Bool). The type
of those names as well as any other names from imported Modules is not
given, however. How then is it possible to type check a Core program?

(For those who are interested in the background of my question: I wondered
if it would be possible to translate Core to Perl. Let's say we'd translate
all top level values to perl subs. Then I need to know the arity of each top
level value to distinguish non-saturated function applications. For example,
if we have

sub M::foo($$$) { my ($a1, $a2, $a3) = @_; ... }

then, if the core code is like  foo a b the corresponding perl code could
be something like
sub { my $arg3 = shift; M::foo($a, $b, $arg3); }
yielding a reference to an anonymous function that, when applied to another
argument, calls foo.
However, this can only be done, when the signature of foo is known, which is
not the case if foo is imported.)

Merry Chrismas
Ingo
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users