[project @ 2001-08-24 13:06:36 by simonpj]
authorsimonpj <unknown>
Fri, 24 Aug 2001 13:06:36 +0000 (13:06 +0000)
committersimonpj <unknown>
Fri, 24 Aug 2001 13:06:36 +0000 (13:06 +0000)
commit9c881117a2bcb40e5a2e991cdd5afc9148aba9f4
treeef27812a899ff2dfc053ab898c5db28bf49129b5
parent72eec6d6e0f7b0041c38de27a4305af406a3f9ab
[project @ 2001-08-24 13:06:36 by simonpj]
------------------------------
Another demand analyser glitch
------------------------------

This fixes, I hope, (in an unsatisfactory way) another demand-analyser
glitch, that resulted in a runtime "entered absent arg" error.

In DmdAnal.annotateLamIdBndr, we now have:

-- This gross hack is needed because otherwise we label
-- a lambda binder with demand 'B'.  But in terms of calling
-- conventions that's Abs, because we don't pass it.  But
-- when we do a w/w split we get
-- fw x = (\x y:B -> ...) x (error "oops")
-- And then the simplifier things the 'B' is a strict demand
-- and evaluates the (error "oops").  Sigh

The hack zaps 'B' to 'Abs', just like 'lazify' does.

Need to talk to John about what the principled reasons are.
ghc/compiler/stranal/DmdAnal.lhs