1. 02 Feb, 2016 1 commit
    • niteria's avatar
      Use a correct substitution in tcCheckPatSynDecl · 07ed2413
      niteria authored
      The `substTheta` call didn't have the free variables of the
      `prov_theta` in the `in_scope` set. It should be enough to add
      `univ_tvs`, as all the `ex_tvs` are already in the domain of
      the substitution.
      
      Test Plan: added a testcase
      
      Reviewers: simonpj, bgamari, goldfire, austin
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1879
      
      GHC Trac Issues: #11524
      07ed2413
  2. 27 Jan, 2016 1 commit
    • eir@cis.upenn.edu's avatar
      Refactor the typechecker to use ExpTypes. · 00cbbab3
      eir@cis.upenn.edu authored
      The idea here is described in [wiki:Typechecker]. Briefly,
      this refactor keeps solid track of "synthesis" mode vs
      "checking" in GHC's bidirectional type-checking algorithm.
      When in synthesis mode, the expected type is just an IORef
      to write to.
      
      In addition, this patch does a significant reworking of
      RebindableSyntax, allowing much more freedom in the types
      of the rebindable operators. For example, we can now have
      `negate :: Int -> Bool` and
      `(>>=) :: m a -> (forall x. a x -> m b) -> m b`. The magic
      is in tcSyntaxOp.
      
      This addresses tickets #11397, #11452, and #11458.
      
      Tests:
        typecheck/should_compile/{RebindHR,RebindNegate,T11397,T11458}
        th/T11452
      00cbbab3
  3. 25 Jan, 2016 1 commit
    • Simon Peyton Jones's avatar
      Special-case implicit params in superclass expansion · ff21795a
      Simon Peyton Jones authored
      This issue came up in Trac #11480, and is documented in
      Note [When superclasses help] in TcRnTypes.
      
      We were getting a spurious warning
        T11480.hs:1:1: warning:
           solveWanteds: too many iterations (limit = 4)
      
      The fix is easy.  A bit of refactoring along the way.
      
      The original bug report in Trac #11480 appears to work
      fine in HEAD and the 8.0 branch but I added a regression
      test in this commit as well.
      ff21795a
  4. 23 Jan, 2016 2 commits
  5. 22 Jan, 2016 1 commit
  6. 18 Jan, 2016 1 commit
  7. 15 Jan, 2016 1 commit
    • eir@cis.upenn.edu's avatar
      Fix #11254. · 39ea4b4b
      eir@cis.upenn.edu authored
      This moves the call to tcSubType into the context of the
      checkInstConstraints call, allowing the deferred type error
      somewhere to hang its hat.
      39ea4b4b
  8. 01 Jan, 2016 1 commit
    • Simon Peyton Jones's avatar
      Add strictness for runRW# · f3cc3456
      Simon Peyton Jones authored
      runRW# isn't inlined until CorePrep, so it's good to expose its
      strictness.  Moreover, if we don't we can get obscure failures
      in coreToStg; see Note [runRW arg] in CorePrep.
      
      This fixes Trac #11291, and makes DfltProb1 compile with -O
      always in order to expose it more vigorously
      f3cc3456
  9. 30 Dec, 2015 1 commit
    • eir@cis.upenn.edu's avatar
      Fix #11305. · c06b46d0
      eir@cis.upenn.edu authored
      Summary:
      In the fallthrough case when doing a subsumption case, we
      need to deeply instantiate to remove any buried foralls in
      the "actual" type.
      
      Once this validates, please feel free to commit it; I may not
      have the chance to do this on Tuesday. Back in full action on
      Wed.
      
      Test Plan: ./validate, typecheck/should_compiler/T11305
      
      Reviewers: austin, bgamari, hvr
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1715
      
      GHC Trac Issues: #11305
      c06b46d0
  10. 26 Dec, 2015 1 commit
  11. 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
  12. 23 Dec, 2015 1 commit
  13. 21 Dec, 2015 2 commits
  14. 18 Dec, 2015 1 commit
    • Simon Peyton Jones's avatar
      tcCheckSatisfiability: less aggressive superclass expansion · ff752a1a
      Simon Peyton Jones authored
      In the pattern-match check we are looking for a proof of
      *unsatisfiablity* among a bunch of givens.  The unsat-ness might be
      hidden in the superclasses, so we must expand them.  But in the common
      case where the constraints are satisfiable, we don't want to expand
      a recursive superclass forever.
      
      This is all a bit arbitrary, but then the whole question is
      undecidable anyway.
      
      The bug in Trac #10592 comment:12 was that I expanded superclasses
      forever.  This patch fixes it.
      ff752a1a
  15. 16 Dec, 2015 1 commit
  16. 16 Nov, 2015 1 commit
  17. 27 Oct, 2015 1 commit
  18. 21 Oct, 2015 1 commit
  19. 20 Oct, 2015 1 commit
  20. 12 Oct, 2015 1 commit
    • Simon Peyton Jones's avatar
      Reinstate monomorphism-restriction warnings · f8fbf385
      Simon Peyton Jones authored
      This patch is driven by Trac #10935, and reinstates the
      -fwarn-monomorphism-restriction warning.  It was first lost in 2010:
      d2ce0f52 "Super-monster patch implementing the new typechecker -- at
      last"
      
      I think the existing documentation is accurate; it is not even
      turned on by -Wall.
      
      I added one test.
      f8fbf385
  21. 21 Sep, 2015 3 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
      Test #10770 · d7f2ab05
      eir@cis.upenn.edu authored
      d7f2ab05
    • eir@cis.upenn.edu's avatar
      Test #10347 · 1a135511
      eir@cis.upenn.edu authored
      1a135511
  22. 03 Sep, 2015 1 commit
  23. 02 Sep, 2015 1 commit
  24. 08 Aug, 2015 1 commit
  25. 30 Jul, 2015 2 commits
  26. 20 Jul, 2015 1 commit
  27. 18 Jul, 2015 2 commits
  28. 15 Jul, 2015 1 commit
    • eir@cis.upenn.edu's avatar
      Fix #10642. · 9f978b67
      eir@cis.upenn.edu authored
      Representational equalities cannot discharge nominal ones.
      Even if, somehow, this didn't cause a type error (as reported
      in the ticket), it would surely cause a core lint error.
      9f978b67
  29. 13 Jul, 2015 1 commit
  30. 07 Jul, 2015 1 commit
    • kanetw's avatar
      Allow deferred type error warnings to be suppressed · f753cf11
      kanetw authored
      Adds a flag -fwarn-deferred-type-errors similar to -fwarn-typed-holes.
      Changes the boolean flag of -fdefer-type-errors to a 3-state flag 
      similar to the one used by -fdefer-typed-holes/-fwarn-typed-holes.
      
      Test Plan: Since only the absence of deferred type error warnings when 
      -fno-warn-deferred-type-errors is passed has to be tested, I duplicated 
      a test case checking -fdefer-type-errors and adjusted it accordingly.
      
      Reviewers: nomeata, simonpj, austin, thomie, bgamari, hvr
      
      Reviewed By: nomeata, simonpj, austin, thomie, bgamari, hvr
      
      Subscribers: bgamari, simonpj, nomeata, thomie
      
      Projects: #ghc
      
      Differential Revision: https://phabricator.haskell.org/D864
      
      GHC Trac Issues: #10283
      f753cf11
  31. 05 Jul, 2015 1 commit
  32. 26 Jun, 2015 1 commit
  33. 25 Jun, 2015 1 commit
  34. 16 Jun, 2015 1 commit