
Malcolm Wallace wrote:
Olaf is the person who will be able to confirm whether this is a correct diagnosis, and if so, to provide the solution.
No, the problem is not within the optimisation for saturated applications. The problem is that qualified names are not handled correctly and sometimes are confused with unqualified names. The following examples demonstrate this. The program import qualified List map :: (a->b) -> a -> b map f = List.map f is wrongly transformed, because the transformation believes that List.map has arity 1, like the just defined function map. If you just change function names, e.g. import qualified List tmap :: (a->b) -> a -> b tmap f = List.map f then the transformation works fine. The transformation knows that List.map has arity 2 and hence won't apply the optimisation. So the problem is in the auxLabelSyntaxTree part. So I'd like to pass the problem back to Malcolm. Or I'll have to see tomorrow how this part works. Ciao, Olaf