1. 23 Sep, 2018 1 commit
    • Simon Peyton Jones's avatar
      Buglet in reporting out of scope errors in rules · cad5d0b6
      Simon Peyton Jones authored
      Most out of scope errors get reported by the type checker these
      days, but not all.  Example, the function on the LHS of a RULE.
      Trace #15659 pointed out that this less-heavily-used code path
      produce a "wacky" error message.  Indeed so.  Easily fixed.
  2. 21 Aug, 2018 1 commit
    • Simon Peyton Jones's avatar
      Improve ambiguous-occurrence error message · 18c302cb
      Simon Peyton Jones authored
      Trac #15487 correctly reported that the qualification
      of a Name in an ambiguous-occurrence error message was
      wrong.  This patch fixes it.
      It's easily done, in RnUtils.addNameClashErrRn
      The problem was that in complaining about M.x we must
      enusre that 'M' part is the same as that used in
  3. 20 Aug, 2018 1 commit
    • Simon Peyton Jones's avatar
      Initialise cec_suppress properly · ecc0ddf6
      Simon Peyton Jones authored
      In TcErrors, cec_suppress is used to suppress low-priority
      errors in favour of truly insoluble ones.
      But I was failing to initialise it correcly at top level, which
      resulted in Trac #15539.  Easy to fix.
      A few regression tests have fewer errors reported, but that seems to
      be an improvement.
  4. 17 Aug, 2018 1 commit
  5. 03 Jun, 2018 1 commit
  6. 18 Dec, 2017 1 commit
  7. 05 Oct, 2017 1 commit
  8. 03 Oct, 2017 1 commit
    • Simon Peyton Jones's avatar
      Suppress error cascade in record fields · cb767542
      Simon Peyton Jones authored
      When a record contruction or pattern uses a data constructor
      that isn't in scope, we may produce spurious ambiguous-field
      errors (Trac #14307).  E.g.
         f (A { fld = x }) = e
      where 'A' is not in scope.  We want to draw attention to the
      out-of-scope data constructor first; once that is fixed we
      can think about the fields.
      This patch suppresses the field errors if the data con is out
      of scope.
  9. 21 Sep, 2017 1 commit
  10. 11 Jul, 2017 1 commit
  11. 11 May, 2017 1 commit
    • mrkgnao's avatar
      Fix incorrect ambiguity error on identically-named data constructors · 1381c142
      mrkgnao authored
      Given multiple in-scope constructors with the same name, say `A`, and a
      function of type `A -> Int`, say, the compiler reports both a "type `A`
      is not in scope" and (incorrectly) an ambiguity error. The latter
      shouldn't be there if `DataKinds` isn't enabled.
      This issue was recommended to me by @mpickering as a suitable first
      task, and the fix was also outlined in the original Trac ticket. It
      involved a simple reordering of the steps taken in `lookup_demoted` in
      `RnEnv.hs`. The fix is to make the `DataKinds` check happen earlier,
      ensuring that the ambiguity check doesn't happen at all if we know the
      constructors couldn't have been promoted.
      Signed-off-by: mrkgnao's avatarSoham Chowdhury <chow.soham@gmail.com>
      Reviewers: mpickering, austin, bgamari
      Reviewed By: mpickering, bgamari
      Subscribers: rwbarton, thomie
      GHC Trac Issues: #13568
      Differential Revision: https://phabricator.haskell.org/D3547
  12. 08 May, 2017 1 commit
  13. 26 Feb, 2017 1 commit
    • rwbarton's avatar
      tests: remove extra_files.py (#12223) · 3415bcaa
      rwbarton authored
      The script I used is included as testsuite/driver/kill_extra_files.py,
      though at this point it is for mostly historical interest.
      Some of the tests in libraries/hpc relied on extra_files.py, so this
      commit includes an update to that submodule.
      One test in libraries/process also relies on extra_files.py, but we
      cannot update that submodule so easily, so for now we special-case it
      in the test driver.
  14. 22 Jan, 2017 1 commit
    • thomie's avatar
      Remove clean_cmd and extra_clean usage from .T files · 5d38fb69
      thomie authored
      The `clean_cmd` and `extra_clean` setup functions don't do anything.
      Remove them from .T files.
      Created using https://github.com/thomie/refactor-ghc-testsuite. This
      diff is a test for the .T-file parser/processor/pretty-printer in that
          find . -name '*.T' -exec ~/refactor-ghc-testsuite/Main "{}" \;
      Tests containing inline comments or multiline strings are not modified.
      Preparation for #12223.
      Test Plan: Harbormaster
      Reviewers: austin, hvr, simonmar, mpickering, bgamari
      Reviewed By: mpickering
      Subscribers: mpickering
      Differential Revision: https://phabricator.haskell.org/D3000
      GHC Trac Issues: #12223
  15. 10 Jan, 2017 1 commit
  16. 02 Jan, 2017 1 commit
  17. 25 Nov, 2016 1 commit
  18. 17 Oct, 2016 1 commit
  19. 12 Oct, 2016 1 commit
    • Ben Gamari's avatar
      RnExpr: Actually fail if patterns found in expression · bce99086
      Ben Gamari authored
      This fixes #12584, where wildcard patterns were snuck into an
      expression, which then crashed the typechecker in TcExpr since EWildPats
      aren't supposed to appear in the AST after renaming.
      The problem was that `rnTopSpliceDecl` failed to check for errors from
      `rnSplice` (as done by other callers to `rnSplice`).
      Thanks to Shayan for reporting this!
      Reviewers: simonpj, austin
      Reviewed By: simonpj
      Subscribers: simonpj, thomie
      Differential Revision: https://phabricator.haskell.org/D2539
      GHC Trac Issues: #12584
  20. 24 Jun, 2016 1 commit
  21. 09 Jun, 2016 1 commit
    • Facundo Domínguez's avatar
      Improve the error messages for static forms. · e9dfb6e5
      Facundo Domínguez authored
      Now the message explains why closed variables are not closed when
      encountered in the body of (static ...).
      This required adding to the local environment the free variables of
      the local bindings in scope. Thus we can analyze and explain why a
      variable is not closed when encountered.
      Test Plan: ./validate
      Reviewers: austin, simonpj, bgamari
      Reviewed By: bgamari
      Subscribers: mboes, thomie
      Differential Revision: https://phabricator.haskell.org/D2167
      GHC Trac Issues: #12003
  22. 28 Apr, 2016 1 commit
  23. 29 Mar, 2016 1 commit
  24. 17 Feb, 2016 1 commit
  25. 18 Nov, 2015 1 commit
  26. 13 Nov, 2015 1 commit
  27. 17 Sep, 2015 1 commit
  28. 03 Sep, 2015 1 commit
  29. 30 Jul, 2015 2 commits
  30. 23 Jul, 2015 1 commit
    • thomasw's avatar
      Parenthesise TypeOperator in import hints · b5c94262
      thomasw authored
      When a constructor was mistakenly imported directly instead of as a
      constructor of a data type, a hint will be shown on how to correctly
      it. Just like the constructor, the data type should be surrounded in
      parentheses if it is an operator (TypeOperator in this case).
      Instead of:
              In module ‘Data.Type.Equality’:
                ‘Refl’ is a data constructor of ‘:~:’
              To import it use
                ‘import’ Data.Type.Equality( :~:( Refl ) )
                ‘import’ Data.Type.Equality( :~:(..) )
              In module ‘Data.Type.Equality’:
                ‘Refl’ is a data constructor of ‘(:~:)’
              To import it use
                ‘import’ Data.Type.Equality( (:~:)( Refl ) )
                ‘import’ Data.Type.Equality( (:~:)(..) )
      Test Plan: pass new test
      Reviewers: austin, bgamari, simonpj
      Reviewed By: simonpj
      Subscribers: simonpj, thomie
      Differential Revision: https://phabricator.haskell.org/D1093
      GHC Trac Issues: #10668
  31. 08 Jul, 2015 1 commit
  32. 26 Jun, 2015 1 commit
  33. 25 Dec, 2014 1 commit
  34. 23 Dec, 2014 1 commit
    • Simon Peyton Jones's avatar
      Test earlier for self-import (Trac #9032) · edd233ac
      Simon Peyton Jones authored
      This patch makes the renamer check for self-import, especially when
      dependencies change, because the typechecker can fall over if that
      I'm still uneasy about *indirect* self-import, but I'll leave that for
      another day
  35. 10 Dec, 2014 1 commit
  36. 21 Nov, 2014 3 commits
  37. 11 Nov, 2014 1 commit