[project @ 2001-09-14 15:44:13 by simonpj]
authorsimonpj <unknown>
Fri, 14 Sep 2001 15:44:13 +0000 (15:44 +0000)
committersimonpj <unknown>
Fri, 14 Sep 2001 15:44:13 +0000 (15:44 +0000)
commit3063cb3d629610339d5f1c38d244617977c5fd21
tree5561863d493bf77314c9f53c58053272f4a4e995
parent7849c8aa807427f9ca8b0897b5d13cf399fd9d23
[project @ 2001-09-14 15:44:13 by simonpj]
--------------------------
Cleanup in DataCon
--------------------------

DO NOT merge with stable

The dataConRepStrictness call used to reuturn a [Demand],
but that's a bit misleading.  In particular, consider a  strict
constructor

data Foo = MkFoo ![Int]

Then the wrapper MkFoo is strict, but the worker $wMkFoo is not.

MkFoo x = case x of { DEFAULT -> $wMkFoo x }

Nevertheless, when we pattern-match on $wMkFoo we will surely
find an evaluated component to the data structure, and that is
what dataConRepStrictness reports, and that's how it is used
in Simplify.

Solution: make dataConRepStrictness return [StrictnessMark]
not [Demand]. A small matter really.
ghc/compiler/basicTypes/DataCon.lhs
ghc/compiler/simplCore/Simplify.lhs