• simonpj@microsoft.com's avatar
    Improve unboxing of strict fields · 08a681f1
    simonpj@microsoft.com authored
    Note [Recursive unboxing]
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    Be careful not to try to unbox this!
    	data T = MkT !T Int
    But it's the *argument* type that matters. This is fine:
    	data S = MkS S !Int
    because Int is non-recursive.
    
    
    Before this patch, we were only doing the unboxing if the *parent*
    data type was non-recursive (eg that meant S was not unboxed), but
    that is over-conservative. 
    
    This showed up with indexed data types (thanks to Roman for finding it)
    because indexed data types are conservatively regarded as always recursive.
    08a681f1