• simonpj@microsoft.com's avatar
    Don't expose the unfolding of dictionary selectors without -O · 74d5597e
    simonpj@microsoft.com authored
    When compiling without -O we were getting code like this
    
    	f x = case GHC.Base.$f20 of
    		  :DEq eq neq -> eq x x
    
    But because of the -O the $f20 dictionary is not available, so exposing
    the dictionary selector was useless.  Yet it makes the code bigger!
    Better to get
    	f x = GHC.Base.== GHC.Bsae.$f20 x x
    
    This patch suppresses the implicit unfolding for dictionary selectors
    when compiling without -O.  We could do the same for other implicit
    Ids, but this will do for now.
    
    There should be no effect when compiling with -O.  Programs should
    be smaller without -O and may run a tiny bit slower.
    
    74d5597e