• simonpj's avatar
    [project @ 2001-09-14 15:44:13 by simonpj] · 3063cb3d
    simonpj authored
    --------------------------
    	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.
    3063cb3d
Simplify.lhs 59.2 KB