patch applied (packages/base): Import GHC.Err so we see bottoming functions properly

Don Stewart dons at galois.com
Fri Apr 3 19:50:35 EDT 2009


simonpj:
> Fri Apr  3 02:11:18 PDT 2009  simonpj at microsoft.com
>   * Import GHC.Err so we see bottoming functions properly
>   Ignore-this: 913e3a4584e73e67ddf9bc3b6f11d11
>   
>   Before this patch, GHC/Err.lhs-boot exported divZeroError and overflowError,
>   as well as plain 'error'.  The latter has a wired-in defn in GHC (MkId.lhs),
>   but the former two do not.  As a result GHC doesn't see that overflowError
>   is a bottoming function at a crucial moment when compiling GHC.Real, and
>   that means that divMod wasn't getting the CPR property.
>   
>   The fix is easy:
>     - GHC/Err.lhs-boot should export only 'error'
>   
>     - GHC.Real, GHC.Int, and GHC.Word should import GHC.Err
>       directly.  They can do this nowadays without creating
>       a module loop, thanks to the new exception story
>   
> 
>     M ./GHC/Err.lhs-boot -7 +1
>     M ./GHC/Int.hs +1
>     M ./GHC/Real.lhs +1
>     M ./GHC/Word.hs +1
> 

Well spotted!


More information about the Cvs-libraries mailing list