Question about hugs´s DEBUG_SHOWSC

dario.bahena@correo.unam.mx dario.bahena@correo.unam.mx
Fri, 13 Apr 2001 00:48:04 -0500


hi haskellers ...

I´m trying to use the hugs´s flag DEBUG_SHOWSC. Everything seems to work
fine, except for one(simple?) detail:

When you use Int or Double literals, hugs always add extra variables,
related to the fromInt/fromDouble aplication. 

For example:

f = 666

should be translated to:

f = fromInt 666

but hugs returns :

f = fromInt v35 666

What is the var. v35 for???, the function fromInt receives just one argument.


If the function has parameters, the resulting function has extra-parameters,
which seems to be out-of-place in both sides of the binding ... 
here you are a couple of examples:

the  function:

f x = 666 

generates the output:

f o2 o1 = fromInt o2 666

And the reported type for f is: Num a => b -> a , which is inconsistent with
the previous result.

the function:

f x = 666 + x

generates :

f o2 o1 = (+)  o2 (fromInt o2 666) o1

which has similar troubles to the previous example.

What are these extra-variables for? Are they a debug-feature? what´s the 
meaning?

And finally, the obligated question: how can I avoid them? I suppose that
I have to take a look at the source code, but: what´d be the part which
is responsible for this(parser,static,type... no please,compiler)?

Thanks in advance.

saludos
dario estepario ...

-------------------------------------------------
Obtén tu correo en www.correo.unam.mx
UNAMonos Comunicándonos