1. 17 Feb, 2016 2 commits
    • eir@cis.upenn.edu's avatar
      Fix #11313. · a6152159
      eir@cis.upenn.edu authored
      Previously, we looked through synonyms when counting arguments,
      but that's a bit silly.
      a6152159
    • thomie's avatar
      Testsuite: delete compiler_lt/le/gt/ge setup functions · 6f25fb32
      thomie authored
      Since we're not consisently keeping track of which tests should pass
      with which compiler versions, there is no point in keeping these
      functions.
      
      Update submodules containers, hpc and stm.
      6f25fb32
  2. 16 Feb, 2016 1 commit
    • Yuras's avatar
      Suggest candidate instances in error message · 5fc06b97
      Yuras authored
      See Trac #9611. In "No instance..." error message we suggest instances
      for other types with the same occ name. It is usefull e.g. when we have
      two different versions of the same package installed.
      
      Test Plan: typecheck/should_fail/tcfail224
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1919
      
      GHC Trac Issues: #9611
      5fc06b97
  3. 15 Feb, 2016 1 commit
  4. 10 Feb, 2016 1 commit
  5. 23 Jan, 2016 1 commit
  6. 21 Jan, 2016 1 commit
    • Simon Peyton Jones's avatar
      Strip casts in checkValidInstHead · b2e6350f
      Simon Peyton Jones authored
      This patch addresses Trac #11464.
      
      The fix is a bit crude (traverse the type to remove CastTys),
      but it's also simple.
      
      See Note [Casts during validity checking] in TcValidity
      b2e6350f
  7. 15 Jan, 2016 1 commit
    • eir@cis.upenn.edu's avatar
      Fix #11355. · e6ca9300
      eir@cis.upenn.edu authored
      Previously, the check for impredicative type applications was
      in the wrong spot.
      
      Test case: typecheck/should_fail/T11355
      e6ca9300
  8. 14 Jan, 2016 1 commit
  9. 07 Jan, 2016 1 commit
    • Simon Peyton Jones's avatar
      Turn AThing into ATcTyCon, in TcTyThing · a5cea73c
      Simon Peyton Jones authored
      This change tidies up and simplifies (a bit) the knot-tying
      when kind-checking groups of type and class declarations.
      
      The trouble (shown by Trac #11356) was that we wanted an error message
      (a kind-mismatch) that involved a type mentioned a (AThing k), which
      blew up.
      
      Since we now seem to have TcTyCons, I decided to use them here.
      It's still not great, but it's easier to understand and more robust.
      a5cea73c
  10. 05 Jan, 2016 1 commit
    • Joachim Breitner's avatar
      Add (failing) test case for #11347 · 1a8b752d
      Joachim Breitner authored
      Unfortunately, I could not add the expected error message, so if someone
      accidentally fixes this bug, this test will still be failing (no harm).
      But maybe someone stumbles over it then and can update the expected
      output.
      1a8b752d
  11. 26 Dec, 2015 1 commit
  12. 24 Dec, 2015 1 commit
    • eir@cis.upenn.edu's avatar
      Visible type application · 2db18b81
      eir@cis.upenn.edu authored
      This re-working of the typechecker algorithm is based on
      the paper "Visible type application", by Richard Eisenberg,
      Stephanie Weirich, and Hamidhasan Ahmed, to be published at
      ESOP'16.
      
      This patch introduces -XTypeApplications, which allows users
      to say, for example `id @Int`, which has type `Int -> Int`. See
      the changes to the user manual for details.
      
      This patch addresses tickets #10619, #5296, #10589.
      2db18b81
  13. 23 Dec, 2015 1 commit
  14. 21 Dec, 2015 2 commits
  15. 23 Nov, 2015 1 commit
  16. 16 Nov, 2015 2 commits
  17. 20 Oct, 2015 1 commit
  18. 21 Sep, 2015 2 commits
    • Edward Z. Yang's avatar
      Unify hsig and hs-boot; add preliminary "hs-boot" merging. · 06d46b1e
      Edward Z. Yang authored
      This patch drops the file level distinction between hs-boot and hsig;
      we figure out which one we are compiling based on whether or not there
      is a corresponding hs file lying around.
      
      To make the "import A" syntax continue to work for bare hs-boot
      files, we also introduce hs-boot merging, which takes an A.hi-boot
      and converts it to an A.hi when there is no A.hs file in scope.
      This will be generalized in Backpack to merge multiple A.hi files together;
      which means we can jettison the "load multiple interface files" functionality.
      
      This works automatically for --make, but for one-shot compilation
      we need a new mode: ghc --merge-requirements A will generate an A.hi/A.o
      from a local A.hi-boot file; Backpack will extend this mechanism further.
      
      Has Haddock submodule update to deal with change in msHsFilePath behavior.
      
          - This commit drops support for the hsig extension. Can
            we support it?  It's annoying because the finder code is
            written with the assumption that where there's an hs-boot
            file, there's always an hs file too.  To support hsig, you'd
            have to probe two locations.  Easier to just not support it.
      
          - #10333
      
       affects us, modifying an hs-boot still doesn't trigger
            recomp.
      
          - See compiler/main/Finder.hs: this diff is very skeevy, but
            it seems to work.
      
          - This code cunningly doesn't drop hs-boot files from the
            "drop hs-boot files" module graph, if they don't have a
            corresponding hs file.  I have no idea if this actually is useful.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: simonpj, austin, bgamari, spinda
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1098
      06d46b1e
    • eir@cis.upenn.edu's avatar
      Slightly better `Coercible` errors. · 2f9809ef
      eir@cis.upenn.edu authored
      This makes two real changes:
       - Equalities like (a ~R [a]) really *are* insoluble. Previously,
         GHC refused to give up when an occurs check bit on a representational
         equality. But for datatypes, it really should bail.
      
       - Now, GHC will sometimes report an occurs check error (in cases above)
         for representational equalities. Previously, it never did.
      
      This "fixes" #10715, where by "fix", I mean clarifies the error message.
      It's unclear how to do more to fix that ticket.
      
      Test cases: typecheck/should_fail/T10715{,b}
      2f9809ef
  19. 11 Sep, 2015 2 commits
    • Jan Stolarek's avatar
      Testsuite cleanup · f30a4925
      Jan Stolarek authored
      As a result of fixing #10836 it is now possible to merge 11 different
      tests for #6018 into one
      f30a4925
    • Simon Peyton Jones's avatar
      Improve rejigConRes (again) · a870738a
      Simon Peyton Jones authored
      I think this patch finally works around the delicacy in the strictness
      of TcTyClsDecls.rejigConRes.   See the notes with that function and
      Note [Checking GADT return types].
      
      As a result, we fix Trac #10836, and improve Trac #7175
      a870738a
  20. 03 Sep, 2015 2 commits
  21. 30 Jul, 2015 2 commits
  22. 28 Jul, 2015 1 commit
    • Joachim Breitner's avatar
      Test case for #10698 · e343c0a7
      Joachim Breitner authored
      the expected error message is from an older version of GHC; I don’t know
      the exact error message that we should get here until the bug is
      fixed...
      e343c0a7
  23. 20 Jul, 2015 1 commit
    • thomie's avatar
      Testsuite: add regression test for missing class constraint · 029367e5
      thomie authored
      The following program is accepted by ghc-7.0 to ghc-7.10, but rejected
      by ghc-6.12.3 and HEAD (and rightfully so):
      
          class Class1 a
          class Class1 a => Class2 a
          class Class2 a => Class3 a
          instance Class3 a => Class2 a
      
      The last line is missing a `Class1 a` constraint. Add a regression test
      for this (typechecker/should_fail/tcfail223).
      
      Add similar missing class constraints to T7126 and T5751. I verified
      that the these changes don't interfer with the intention of the tests
      (they still result in a loop with ghc-7.4.1).
      
      Reviewers: austin, simonpj, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1078
      029367e5
  24. 16 Jul, 2015 1 commit
  25. 13 Jul, 2015 1 commit
  26. 16 Jun, 2015 2 commits
    • eir@cis.upenn.edu's avatar
      Fix #10495. · 0de0b146
      eir@cis.upenn.edu authored
      This change means that the intricate reasoning in TcErrors
      around getting messages just right for nominal equalities
      is skipped for representational equalities.
      0de0b146
    • eir@cis.upenn.edu's avatar
      Fix #10534 · 89c7168c
      eir@cis.upenn.edu authored
      Test case: typecheck/should_fail/T10534
      89c7168c
  27. 09 Jun, 2015 1 commit
  28. 30 Apr, 2015 1 commit
    • Simon Peyton Jones's avatar
      Tidy up treatment of FlexibleContexts · b83160d0
      Simon Peyton Jones authored
      Previously (Trac #10351) we could get
      
          Non type-variable argument in the constraint: C [t]
          (Use FlexibleContexts to permit this)
          When checking that `f' has the inferred type
            f :: forall t. C [t] => t -> ()
      
      which is a bit stupid: we have *inferred* a type that we
      immediately *reject*.  This patch arranges that that the
      generalisation mechanism (TcSimplify.decideQuantification)
      doesn't pick a predicate that will be rejected by the
      subsequent validity check.
      
      This forced some minor refactoring, as usual.
      b83160d0
  29. 29 Apr, 2015 1 commit
    • Simon Peyton Jones's avatar
      Improve improvement in the constraint solver · a1275a76
      Simon Peyton Jones authored
      This regrettably-big patch substantially improves the way in which
      "improvement" happens in the constraint solver.  It was triggered by
      trying to crack Trac #10009, but it turned out to solve #10340 as
      well.
      
      The big picture, with several of the trickiest examples, is described
      in Note [The improvement story] in TcInteract.
      
      The major change is this:
      
      * After solving we explicitly try "improvement", by
           - making the unsolved Wanteds into Deriveds
           - allowing Deriveds to rewrite Deriveds
        This more aggressive rewriting "unlocks" some extra
        guess-free unifications.
      
      * The main loop is in TcInteract.solveSimpleWanteds, but I also ended
        up refactoring TcSimplify.simpl_loop, and its surrounding code.
      
        Notably, any insolubles from the Givens are pulled out
        and treated separately, rather than staying in the inert set
        during the solveSimpleWanteds loop.
      
      There are a lot of follow-on changes
      
      * Do not emit generate Derived improvements from Wanteds.
        This saves work in the common case where they aren't needed.
      
      * For improvement we should really do type-class reduction on Derived
        constraints in doTopReactDict.  That entailed changing the GenInst
        constructor a bit; a local and minor change
      
      * Some annoying faffing about with dropping derived constraints;
        see dropDerivedWC, dropDerivedSimples, dropDerivedInsols,
        and their Notes.
      
      * Some substantial refactoring in TcErrors.reportWanteds.
        This work wasn't strictly forced, but I got sucked into it.
        All the changes are in TcErrors.
      
      * Use TcS.unifyTyVar consistently, rather than setWantedTyBind,
        so that unifications are properly tracked.
      
      * Refactoring around solveWantedsTcM, solveWantedsAndDrop.
        They previously guaranteed a zonked result, but it's more
        straightforward for clients to zonk.
      a1275a76
  30. 24 Apr, 2015 1 commit
  31. 22 Apr, 2015 2 commits