• Herbert Valerio Riedel's avatar
    Canonicalise MonoidFail instances in GHC · 346e562a
    Herbert Valerio Riedel authored
    IOW, code compiles -Wnoncanonical-monoidfail-instances clean now
    
    This is easy now since we require GHC 8.0/base-4.9 or later
    for bootstrapping.
    
    Note that we can easily enable `MonadFail` via
    
      default-extensions: MonadFailDesugaring
    
    in compiler/ghc.cabal.in
    
    which currently would point out that NatM doesn't have
    a proper `fail` method, even though failable patterns
    are made use of:
    
      compiler/nativeGen/SPARC/CodeGen.hs:425:25: error:
        * No instance for (Control.Monad.Fail.MonadFail NatM)
            arising from a do statement
            with the failable pattern ‘(dyn_c, [dyn_r])’
    346e562a
PrelRules.hs 63.3 KB