1. 21 Mar, 2016 7 commits
    • eir@cis.upenn.edu's avatar
      Fix #11635 / #11719. · 1701255c
      eir@cis.upenn.edu authored
      Instead of creating a new meta-tyvar and then unifying it with
      a known kind in a KindedTyVar in a LHsQTyVars, just use the known kind.
      
      Sadly, this still doesn't make #11719 usable, because while you can
      now define a higher-kinded type family, you can't write any equations
      for it, which is a larger problem.
      
      test cases: dependent/should_compile/T{11635,11719}
      1701255c
    • eir@cis.upenn.edu's avatar
      Add two small optimizations. (#11196) · 0706a103
      eir@cis.upenn.edu authored
      - Optimize zonking * to avoid allocation.
      - Try to avoid looking at the free variables of a type in the
        pure unifier. We need look at the variables only in the case
        of a forall.
      
      The performance results updates included in this also include
      a regression, but the regression is not due to this patch. When
      validating previous patches, the test case failed, but I was
      unable to reproduce outside of validation, so I let it go by, thinking
      the failure was spurious. Upon closer inspection, the perf number
      was right at the line, and the wibble between a valiation environment
      and a regular test run was enough to make the difference.
      0706a103
    • eir@cis.upenn.edu's avatar
      01b29ebd
    • eir@cis.upenn.edu's avatar
      af2f7f90
    • niteria's avatar
      Remove unused substTyWithBinders functions · c37a583f
      niteria authored
      Originally I wanted to only remove substTyWithBindersUnchecked, but
      since both of them are unused maybe we don't need them.
      
      Test Plan: ./validate
      
      Reviewers: austin, goldfire, bgamari, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: thomie, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D2025
      
      GHC Trac Issues: #11371
      c37a583f
    • niteria's avatar
      Remove unnecessary Ord instance for ConLike · 2cb55772
      niteria authored
      The Ord instance for ConLike uses Unique order which is bad for
      determinism. Fortunately it's not used, so we can just delete it.
      The is part of the effort to make Unique comparisons explicit.
      
      Test Plan: ./validate
      
      Reviewers: austin, simonmar, bgamari, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2018
      
      GHC Trac Issues: #4012
      2cb55772
    • niteria's avatar
      Delete a misleading comment in TyCon · 3ade8bc7
      niteria authored
      `Ord` for `TyCon` uses `Uniques` and it's not lexicographic.
      I did some archeology and in
      rGHC6c381e873e222417d9a67aeec77b9555eca7b7a8 the comment was introduced,
      where there was something like `Ord3 Tycon` which *was* lexicographic.
      In rGHC9dd6e1c216993624a2cd74b62ca0f0569c02c26b `Ord3 TyCon` was already
      not lexicographic and `Ord3` got removed.
      
      Test Plan: make someone take a look
      
      Reviewers: hvr, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D2017
      3ade8bc7
  2. 20 Mar, 2016 13 commits
  3. 19 Mar, 2016 1 commit
  4. 17 Mar, 2016 4 commits
    • eir@cis.upenn.edu's avatar
      Fix #11512 by getting visibility right for methods · f4f315a3
      eir@cis.upenn.edu authored
      Test case: typecheck/should_compile/T11512
      f4f315a3
    • eir@cis.upenn.edu's avatar
      Fix #11716. · 3fe87aa0
      eir@cis.upenn.edu authored
      There were several smallish bugs here:
       - We had too small an InScopeSet when rejigging GADT return types.
       - When adding the extra_tvs with a datatype kind signature, we
         were sometimes changing Uniques of an explicitly bound kind var.
       - Using coercionKind in the flattener got the wrong visibility
         for a binder. Now we just zonk to get what we need.
      
      Test case: dependent/should_compile/RaeJobTalk
      3fe87aa0
    • Csongor Kiss's avatar
      typechecker: fix trac issue #11708 · c5ed41cb
      Csongor Kiss authored and eir@cis.upenn.edu's avatar eir@cis.upenn.edu committed
      Summary: Fixes T11708
      
      Reviewers: austin, bgamari, goldfire, simonpj
      
      Reviewed By: goldfire, simonpj
      
      Subscribers: simonpj, goldfire, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2006
      
      GHC Trac Issues: #11708
      c5ed41cb
    • eir@cis.upenn.edu's avatar
      Fix #11711. · b5565f1a
      eir@cis.upenn.edu authored
      There were two bugs here, both simple: we need to filter out
      covars before calling isMetaTyVar in the solver, and TcPat had
      a tcSubType the wrong way round.
      
      test case: dependent/should_compile/T11711
      b5565f1a
  5. 16 Mar, 2016 4 commits
    • Erik de Castro Lopo's avatar
      DriverPipeline: Fix 'unused arguments' warnings from Clang · 46f9a476
      Erik de Castro Lopo authored
      When using Clang as the C compiler, over 100 tests were failing
      due to Clang reporting that some command line arguments were not
      being used. These warnings only occur when Clang is compiling
      assembler files which happens in two places, one of which already
      conditionally adding `-Qunused-arguments` to the command line when
      the compiler was Clang. This fixes the other.
      
      Test Plan: validate with clang as the C compiler
      
      Reviewers: bgamari, hvr, austin, rwbarton
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1998
      
      GHC Trac Issues: #11684
      46f9a476
    • eir@cis.upenn.edu's avatar
      Clean up some pretty-printing in errors. · 5d98b8bf
      eir@cis.upenn.edu authored
      It turns out that there were some pretty egregious mistakes
      in the code that suggested -fprint-explicit-kinds, which are
      fixed. This commit also reorders a bunch of error messages,
      which I think is an improvement.
      
      This also adds the test case for #11471, which is what
      triggered the cleanup in TcErrors. Now that #11473 is done,
      there is nothing more outstanding for #11471.
      
      test case: dependent/should_fail/T11471
      5d98b8bf
    • eir@cis.upenn.edu's avatar
      Fix printing of "kind" vs. "type" · f602f4a6
      eir@cis.upenn.edu authored
      This is as reported in #11471, though it's not the focus of that
      ticket.
      
      test case: polykinds/KindVType
      f602f4a6
    • eir@cis.upenn.edu's avatar
      Fix #11473. · aade1112
      eir@cis.upenn.edu authored
      I've added a check in the zonker for representation polymorphism.
      I don't like having this be in the zonker, but I don't know where
      else to put it. It can't go in TcValidity, because a clever enough
      user could convince the solver to do bogus representation polymorphism
      even though there's nothing obviously wrong in what they wrote.
      Note that TcValidity doesn't run over *expressions*, which is where
      this problem arises.
      
      In any case, the check is simple and it works.
      
      test case: dependent/should_fail/T11473
      aade1112
  6. 15 Mar, 2016 11 commits
    • eir@cis.upenn.edu's avatar
      Fix #11357. · 1eefedf7
      eir@cis.upenn.edu authored
      We were looking at a data instance tycon for visibility info,
      which is the wrong place to look. Look at the data family tycon
      instead.
      
      Also improved the pretty-printing near there to suppress kind
      arguments when appropriate.
      1eefedf7
    • eir@cis.upenn.edu's avatar
      857e9b02
    • eir@cis.upenn.edu's avatar
      Remove redundant anonymiseTyBinders (#11648) · 19be5385
      eir@cis.upenn.edu authored
      This was necessary in an earlier version of the patch for #11648,
      but not in the final version. I forgot to remove it.
      19be5385
    • eir@cis.upenn.edu's avatar
      de4df6b4
    • eir@cis.upenn.edu's avatar
      Allow eager unification with type families. · 3f5d1a13
      eir@cis.upenn.edu authored
      Previously, checkTauTvUpdate, used in the eager unifier (TcUnify)
      right before writing to a metavar, refused to write a metavar to
      a type involving type functions. The reason for this was given
      in a Note, but the Note didn't make all that much sense and even
      admitted that it was a bit confused. The Note, in turn, referred
      to another Note, which it was quite sceptical of, as well.
      
      The type-family check was slowing down performance, so I tried
      removing it, running the tests referred to in the Note. The tests
      all passed without the check. Looking at more test results, I
      saw several error messages improve without the check, and some cases
      where GHC looped (T7788, in particular) it now doesn't.
      
      So, all in all, quite a win: Two hairy Notes removed, several lines
      of code removed, better performance, and improved output.
      
      [skip ci]
      3f5d1a13
    • eir@cis.upenn.edu's avatar
      Fix #11648. · 55577a91
      eir@cis.upenn.edu authored
      We now check that a CUSK is really a CUSK and issue an error if
      it isn't. This also involves more solving and zonking in
      kcHsTyVarBndrs, which was the outright bug reported in #11648.
      
      Test cases: polykinds/T11648{,b}
      
      This updates the haddock submodule.
      
      [skip ci]
      55577a91
    • eir@cis.upenn.edu's avatar
      Document TypeInType (#11614) · e7a8cb14
      eir@cis.upenn.edu authored
      [skip ci]
      e7a8cb14
    • eir@cis.upenn.edu's avatar
      Test case for #11699 in typecheck/should_compile · 693b38cb
      eir@cis.upenn.edu authored
      [skip ci]
      693b38cb
    • eir@cis.upenn.edu's avatar
      Expand Note [Non-trivial definitional equality] · 6c768fcf
      eir@cis.upenn.edu authored
      This adapts the text from D1944.
      
      [skip ci]
      6c768fcf
    • eir@cis.upenn.edu's avatar
      Refactor visible type application. · 972730cc
      eir@cis.upenn.edu authored
      This replaces the old HsType and HsTypeOut constructors
      with HsAppType and HsAppTypeOut, leading to some simplification.
      (This refactoring addresses #11329.)
      
      This also fixes #11456, which stumbled over HsType (which is
      not an expression).
      
      test case: ghci/scripts/T11456
      
      [skip ci]
      972730cc
    • eir@cis.upenn.edu's avatar
      Fix #11401. · 35d37ff8
      eir@cis.upenn.edu authored
      This commit teaches shortCutReduction about Derived constraints.
      
      [skip ci]
      35d37ff8