Laszlo Nemeth wrote:
> I'm putting the static argument transformation (simplCore/SAT.lhs)
> back to GHC 2.0899999999999999, which works as advertised but:
> when it gets to code generation (codeGen/ClosureInfo.lhs) the
> impossible happens.
> 
> panic! (the `impossible' happened):
>         fun_result_ty: 1 $x4_s1bF [$x0_ts1bH]
> 
> (a very helpful message indeed :( )
> 
> On the other hand when I compile the same file, with the same options
> but -O on everything works fine.
> 
> I guess that the code generator is not prepared to work if lambda
> lifting hadn't been done before...(which should have happened in the
> first place as part of the final simplification anyway!)

Hi, I wrote the SAT code, 2+years ago :)
Lambda Lifting is not needed in ghc/stg, actually (in general) it undoes
SAT
(when I tested SAT I either didn't do any LL, or had a selective LL on,
check http://www.di.ufpe.br/~alms/ps/thesis.ps.gz for details on what I
found out about SAT & LL).

As far as I can remember (since I was just testing the effect of SAT :)
it leaves some identifiers with the same unique id, that must be
inlined.
Therefore a call to the simplifier right after SAT is needed, 
since the simplifier will do the inlinings and will 
also give new uniques to all identifiers.
If you don't call the simplifier right after SAT
this might cause you problems further down the path.

My guess is that with -O you somehow get the call to the simplifier that
fixes things up...but it could be something completely different,
since the message seems to be related to types...

cheers,

Andre.

-- 
Andre Santos                    Departamento de Informatica
e-mail: [EMAIL PROTECTED]         Universidade Federal de Pernambuco
http://www.di.ufpe.br/~alms     CP 7851, CEP 50732-970, Recife PE Brazil

Reply via email to