• Simon Peyton Jones's avatar
    Fix nasty bug in w/w for absence analysis · dbbee1ba
    Simon Peyton Jones authored
    This dark corner was exposed by Trac #14285.  It involves the
    interaction between absence analysis and INLINABLE pragmas.
    
    There is a full explanation in Note [aBSENT_ERROR_ID] in MkCore,
    which you can read there.  The changes in this patch are
    
    * Make exprIsHNF return True for absentError, treating
      absentError like an honorary data constructor.
    
    * Make absentError /not/ be diverging, unlike other error Ids.
    
    This is all a bit horrible.
    
    * While doing this I found that exprOkForSpeculation didn't
      have a case for value lambdas so I added one.  It's not
      really called on lifted types much, but it seems like the
      right thing
    dbbee1ba
MkId.hs 61.2 KB