1. 30 Oct, 2015 1 commit
    • Simon Peyton Jones's avatar
      Fix unused-import stuff in a better way · 9376249b
      Simon Peyton Jones authored
      The fix for Trac #10890 in commit 1818b48e, namely
         Fix incorrect import warnings when methods with identical names are imported
      was wrong, as demonstrated by the new test T10890_2.  It suppressed
      far too many warnings!
      
      This patch fixes the original problem in a different way, by making
      RdrName.greUsedRdrName a bit cleverer.
      
      But this too is not really the Right Thing.  I think the Right Thing is
      to store the /GRE/ in the tcg_used_rdrnames, not the /RdrName/.  That
      would be a lot simpler and more direct.
      
      But one step at a time.
      9376249b
  2. 13 Oct, 2015 1 commit
    • Ömer Sinan Ağacan's avatar
      Fix incorrect import warnings when methods with identical names are imported · 1818b48e
      Ömer Sinan Ağacan authored
      Currently, GHC's warning generation code is assuming that a name (`RdrName`)
      can be imported at most once. This is a correct assumption, because 1) it's OK
      to import same names as long as we don't use any of them 2) when we use one of
      them, GHC generates an error because it doesn't disambiguate it automatically.
      
      But apparently the story is different with typeclass methods. If I import two
      methods with same names, it's OK to use them in typeclass instance
      declarations, because the context specifies which one to use. For example, this
      is OK (where modules A and B define typeclasses A and B, both with a function
      has),
      
          import A
          import B
      
          data Blah = Blah
      
          instance A Blah where
            has = Blah
      
          instance B Blah where
            has = Blah
      
      But GHC's warning generator is not taking this into account, and so if I change
      import list of this program to:
      
          import A (A (has))
          import B (B (has))
      
      GHC is printing these warnings:
      
          Main.hs:5:1: Warning:
              The import of ‘A.has’ from module ‘A’ is redundant
      
          Main.hs:6:1: Warning:
              The import of ‘B.has’ from module ‘B’ is redundant
      
      Why? Because warning generation code is _silently_ ignoring multiple symbols
      with same names.
      
      With this patch, GHC takes this into account. If there's only one name, then
      this patch reduces to the previous version, that is, it works exactly the same
      as current GHC (thanks goes to @quchen for realizing this).
      
      Reviewed By: austin
      
      Differential Revision: https://phabricator.haskell.org/D1257
      
      GHC Trac Issues: #10890
      1818b48e
  3. 08 Oct, 2015 1 commit
  4. 21 Aug, 2015 1 commit
  5. 25 Jul, 2015 1 commit
    • Sergei Trofimovich's avatar
      renamer: fix module-level deprecation message · b04bed0a
      Sergei Trofimovich authored
      Noticed today that deprecation warnings are
      slightly broken in -HEAD:
      
        mtl-2.2.1/Control/Monad/Error/Class.hs:46:1: warning:
          Module ‘Control.Monad.Trans.Error’ is deprecated:
            ([", U, s, e,  , C, o, n, t, r, o, l, ., M, o, n, a, d, ., T, r, a,
              n, s, ., E, x, c, e, p, t,  , i, n, s, t, e, a, d, "],
             Use Control.Monad.Trans.Except instead)
      
      Commit e6191d1c
      slightly changed WarningTxt declaration:
      
      -data WarningTxt = WarningTxt (Located SourceText) [Located FastString]
      -                | DeprecatedTxt (Located SourceText) [Located FastString]
      +data WarningTxt = WarningTxt (Located SourceText)
      +                             [Located (SourceText,FastString)]
      +                | DeprecatedTxt (Located SourceText)
      +                                [Located (SourceText,FastString)]
      
      But 'moduleWarn' function was not updated to do the stripping.
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
      
      Reviewers: austin, bgamari, hvr, goldfire, rwbarton, alanz
      
      Reviewed By: rwbarton, alanz
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1096
      
      GHC Trac Issues: #10313
      b04bed0a
  6. 12 May, 2015 1 commit
  7. 02 Apr, 2015 1 commit
  8. 21 Nov, 2014 1 commit
    • Eric Seidel's avatar
      Add flag `-fwarn-missing-exported-sigs` · 067f1e4f
      Eric Seidel authored
      Summary: add `-fwarn-missing-exported-sigs` to only warn about missing signatures if the name is exported
      
      Test Plan: validate, see testsuite/tests/warnings/should_compile/T2526.hs
      
      Reviewers: ezyang, austin, thomie
      
      Reviewed By: austin, thomie
      
      Subscribers: ezyang, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D482
      
      GHC Trac Issues: #2526
      
      Conflicts:
      	docs/users_guide/7.10.1-notes.xml
      067f1e4f
  9. 21 Oct, 2014 1 commit
    • mlen's avatar
      Enabled warn on tabs by default (fixes #9230) · 972ba121
      mlen authored
      Summary:
      This revision enables -fwarn-tabs by default and add a suppression
      flag, so that GHC compilation won't fail when some files contain tab
      characters.
      
      Test Plan: Additional test case, T9230, was added to cover that change.
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: simonmar, ezyang, carter, thomie, mlen
      
      Differential Revision: https://phabricator.haskell.org/D255
      
      GHC Trac Issues: #9230
      
      Conflicts:
      	testsuite/driver/testlib.py
      972ba121
  10. 09 Jun, 2014 1 commit
  11. 25 Feb, 2014 1 commit
  12. 18 Sep, 2013 2 commits