Skip to content
  • Simon Peyton Jones's avatar
    Allow proper errors/warnings in core2core passes · e2b57381
    Simon Peyton Jones authored
    This patch makes it possible for core-to-core passes to emit
    proper error messages and warnings.
    
      * New function CoreMonad.warnMsg
    
      * CoreMonad.warnMsg and errorMsg now print a proper warning/error
        message heading.
    
      * CoreMonad carries a SrcSpan, which is used in warning/error
        messages.  It is initialised to be the source file name, but
        a core-to-core pass could set it more specifically if it had
        better location information.
    
    There was a bit of plumbing needed to get the filename to the
    right place.
    e2b57381