RE: Question about hugs´s DEBUG_SHOWSC

Chris Angus CAngus@Armature.com
Fri, 13 Apr 2001 09:44:48 +0100


is this not the dictionary passing (or whatever)to achieve overloading.

> -----Original Message-----
> From: dario.bahena@correo.unam.mx =
[mailto:dario.bahena@correo.unam.mx]
> Sent: 13 April 2001 06:48
> To: hugs-users@haskell.org
> Cc: hugs-bugs@haskell.org; haskell@haskell.org
> Subject: Question about hugs´s DEBUG_SHOWSC
> 
> 
> 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
> 
> _______________________________________________
> Haskell mailing list
> Haskell@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell
>