1. 12 May, 2016 6 commits
  2. 11 May, 2016 9 commits
  3. 10 May, 2016 25 commits
    • niteria's avatar
      Kill foldUFM in classifyTyCon · e207198f
      niteria authored
      We can get away with anyUFM here.
      e207198f
    • niteria's avatar
      make accept for Make simplifyInstanceContexts deterministic · ab91b851
      niteria authored
      Making it deterministic changed some error messages and I
      forgot to make accept. Relevant change: b58b0e18.
      ab91b851
    • niteria's avatar
      Fix typos · 402f201d
      niteria authored
      402f201d
    • niteria's avatar
      Get rid of Traversable UniqFM and Foldable UniqFM · 7e28e47c
      niteria authored
      Both Traversable and Foldable can introduce non-determinism
      and because of typeclass overloading it's implicit and not
      obvious at the call site. This removes the instances, so that
      they can't accidentally be used.
      
      Test Plan: ./validate
      
      Reviewers: austin, goldfire, bgamari, simonmar, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2190
      
      GHC Trac Issues: #4012
      7e28e47c
    • Simon Peyton Jones's avatar
      Test Trac #11640 · f6e58be2
      Simon Peyton Jones authored
      f6e58be2
    • Simon Peyton Jones's avatar
      Record that EqualityConstraint now works · 1a43783e
      Simon Peyton Jones authored
      Fixing Trac #9478
      1a43783e
    • Simon Peyton Jones's avatar
      Use partial-sig constraints as givens · e24b50c3
      Simon Peyton Jones authored
      In TcSimplify.simplifyInfer, use the context of a partial type
      signature as 'givens' when simplifying the inferred constraints of the
      group.  This way we get maximum benefit from them.  See
      Note [Add signature contexts as givens].
      
      This (finally) fixes test EqualityConstraints in Trac #9478.
      
      And it's a nice tidy-up.
      e24b50c3
    • Simon Peyton Jones's avatar
      Add Outputable ShowHowMuch · e7e5939d
      Simon Peyton Jones authored
      I needed this instance when debugging, so I thought I'd add
      it permanently.
      e7e5939d
    • Simon Peyton Jones's avatar
      Comments only · b21e8cc3
      Simon Peyton Jones authored
      b21e8cc3
    • Simon Peyton Jones's avatar
      Comments about static forms · a4717f51
      Simon Peyton Jones authored
      a4717f51
    • niteria's avatar
      Make simplifyInstanceContexts deterministic · b58b0e18
      niteria authored
      simplifyInstanceContexts used cmpType which is nondeterministic
      for canonicalising typeclass constraints in derived instances.
      Following changes make it deterministic as explained by the
      Note [Deterministic simplifyInstanceContexts].
      
      Test Plan: ./validate
      
      Reviewers: simonmar, goldfire, simonpj, austin, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2173
      
      GHC Trac Issues: #4012
      b58b0e18
    • niteria's avatar
      Kill unnecessary cmpType in lhs_cmp_type · 4ac0e815
      niteria authored
      This is the only call site of `lhs_cmp_type` and we only
      care about equality.
      `cmpType` is nondeterministic (because `TyCon`s are compared
      with Uniques in `cmpTc`), so if we don't have to use it, it's
      better not to.
      
      Test Plan: ./validate
      
      Reviewers: simonmar, goldfire, bgamari, austin, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2172
      
      GHC Trac Issues: #4012
      4ac0e815
    • Erik de Castro Lopo's avatar
      Comments only · bff6e1bb
      Erik de Castro Lopo authored
      [skip ci]
      bff6e1bb
    • Simon Marlow's avatar
      Fix a crash in requestSync() · ea3d1efb
      Simon Marlow authored
      It was possible for a thread to read invalid memory after a conflict
      when multiple threads were synchronising.
      
      I haven't been successful in constructing a test case that triggers
      this, but we have some internal code that ran into it.
      ea3d1efb
    • Ben Gamari's avatar
      RdrHsSyn: Only suggest `type` qualification when appropriate · e996e85f
      Ben Gamari authored
      This suggestion only applies to operators.
      e996e85f
    • Matthew Pickering's avatar
      Forbid variables to be parents in import lists. · 53f26f5a
      Matthew Pickering authored
      In the long discussion on #11432, it was decided that when a type
      constructor is parsed as a variable ((--.->) is one example) then in
      order to export the type constructor then the user should be required to
      use the ExplicitNamespaces keyword.
      
      This was implemented in quite an indirect manner in the renamer. It
      is much more direct to enforce this in the parser at the expense of
      slighty worse error messages. Further to this, the check in the
      renamer was actually slightly wrong. If the variable was in scope
      then no error was raised, this was causing panics, see #12026 for an
      example.
      
      Reviewers: austin, bgamari
      
      Subscribers: davean, skvadrik, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2181
      
      GHC Trac Issues: #12026
      53f26f5a
    • Ben Gamari's avatar
      stg/Types.h: Fix comment and #include · 3ca78062
      Ben Gamari authored
      3ca78062
    • Simon Peyton Jones's avatar
      Re-do the invariant for TcDepVars · 05974932
      Simon Peyton Jones authored
      Previously I had it so that dv_kvs and dv_tvs didn't
      overlap.  Now they can, and quantifyZonkedTyVars
      removes the former from the latter.  This is more
      economical, and in fact there was a bug where the
      invariant wasn't re-established.
      
      It's much easier to allow dv_kvs and dv_kvs to overlap,
      and to eliminate the overlap in TcMType.quantifyZonkedTyVars
      05974932
    • Simon Peyton Jones's avatar
      Error message wibbles, re partial type sigs · bb296bf1
      Simon Peyton Jones authored
      I committed three patches involving partial type sigs that
      are collectively responsible for these error message changes.
      The are all just changes to numbering in the pretty-printer.
      
      I didn't bother to partition them between patches -- sorry!
      bb296bf1
    • Simon Peyton Jones's avatar
      Tidy up partial-sig quantification · 9dbf5f5c
      Simon Peyton Jones authored
      There's a messy bit of tcSimplifyInfer which concerns how
      quantify when partial type signatures are involved. This
      patch tidies it up a lot.
      
      Notice that decideQuantification and quantify_tvs get
      much simpler.  And previously the inferred type of a
      function could be cluttered with phantom variables that
      were relevant only to the error messgas.
      
      See Note [Quantification and partial signatures].
      9dbf5f5c
    • Simon Peyton Jones's avatar
      Fix partial sigs and pattern bindings interaction · e1ff2b49
      Simon Peyton Jones authored
      It turns out that GHC 8.0 would accept entirely bogus
      programs like
      
         f2 :: (True, _) -> Char
         Just f2 = Just (\x->x)
      
      (which is now partial-sigs/should_fail/PatBind3)
      
      This also fixes Trac #9478, test `PatBind2`.
      e1ff2b49
    • Simon Peyton Jones's avatar
      Comments only · cc75a5d9
      Simon Peyton Jones authored
      cc75a5d9
    • Simon Peyton Jones's avatar
      Emit wild-card constraints in the right place · 76d9156f
      Simon Peyton Jones authored
      We were failing to emit wild-card hole constraints altogether
      in the case of pattern bindings.  Reason: it was done in
      tcExtendTyVarEnvFromSig, which isn't called for pattern bindings.
      
      This patch make it work right for both pattern and function
      bindings.  Mainly, there is a call to emitWildCardHolds in
      tcRhs for both PatBind and FunBind.
      
      I also killed off TcExpr.typeSigCtxt.
      76d9156f
    • Simon Peyton Jones's avatar
      White space only · 2593e204
      Simon Peyton Jones authored
      2593e204
    • wereHamster's avatar
      Use stdint types for Stg{Word,Int}{8,16,32,64} · 260a5648
      wereHamster authored
      We can't define Stg{Int,Word} in terms of {,u}intptr_t because STG
      depends on them being the exact same size as void*, and {,u}intptr_t
      does not make that guarantee. Furthermore, we also need to define
      StgHalf{Int,Word}, so the preprocessor if needs to stay. But we can at
      least keep it in a single place instead of repeating it in various
      files.
      
      Also define STG_{INT,WORD}{8,16,32,64}_{MIN,MAX} and use it in HsFFI.h,
      further reducing the need for CPP in other files.
      
      Reviewers: austin, bgamari, simonmar, hvr, erikd
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2182
      260a5648