1. 28 Aug, 2014 2 commits
  2. 22 Aug, 2014 1 commit
    • Edward Z. Yang's avatar
      Do not zero out version number when processing wired-in packages. · 22520cd7
      Edward Z. Yang authored
      
      
      Summary:
      Previously, GHC would look for instances of wired-in packages in the
      in-memory package database and null out the version number.  This was
      necessary when the sourcePackageId was used to determine the linker
      symbols; however, we now use a package key, so only that needs to be
      updated.
      
      Long-term, we can remove this hack by ensuring that Cabal actually records
      the proper package key in the database.  This will also fix an unrelated
      hack elsewhere.
      
      Keeping version numbers means that wired in packages get rendered differently
      when output by GHC.  This is the source of all the test-case output changes.
      
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: hvr, austin
      
      Subscribers: simonmar, ezyang, carter
      
      Differential Revision: https://phabricator.haskell.org/D170
      22520cd7
  3. 12 Aug, 2014 1 commit
  4. 08 Aug, 2014 1 commit
    • Simon Peyton Jones's avatar
      Implement the final change to INCOHERENT from Trac #9242 · dff0623d
      Simon Peyton Jones authored
      The change here is to make INCOHERENT slightly more permissive:
      
        if the selected candidate is incoherent
        then ignore all unifying candidates
      
      This allows us to move the {-# INCOHERENT #-} pragma from
        from   instance Typeable (f a)
        to     Typeable (n:Nat) and Typable (s:Symbol)
      where it belongs, and where Trac #9242 said it should be.
      
      I don't think this will affect anyone.
      
      I've updated the user manual.
      dff0623d
  5. 31 Jul, 2014 1 commit
    • Simon Peyton Jones's avatar
      Complete work on new OVERLAPPABLE/OVERLAPPING pragmas (Trac #9242) · 1ae5fa45
      Simon Peyton Jones authored
      * Deprecate -XOverlappingInstances
      
      * Update test suite.  Several tests even had entirely unnecessary
        uses of -XOverlappingInstances
      
      * Update user manual with a careful description of the instance
        resolution story
      
      * Fix an outright bug in the handling of duplidate instances in GHCi,
        which are meant to silently overwrite the earlier duplicate. The
        logic was right for family instances but was both more complicated,
        and plain wrong, for class instances.  (If you are interested, the
        bug was that we were eliminating the duplicate from the InstEnv, but
        not from the [ClsInst] held in tcg_insts.)  Test is ghci044a.
      1ae5fa45
  6. 17 Jul, 2014 1 commit
  7. 15 Jul, 2014 1 commit
    • Simon Peyton Jones's avatar
      Entirely re-jig the handling of default type-family instances (fixes Trac #9063) · 9b8ba629
      Simon Peyton Jones authored
      In looking at Trac #9063 I decided to re-design the default
      instances for associated type synonyms.  Previously it was all
      jolly complicated, to support generality that no one wanted, and
      was arguably undesirable.
      
      Specifically
      
      * The default instance for an associated type can have only
        type variables on the LHS.  (Not type patterns.)
      
      * There can be at most one default instances declaration for
        each associated type.
      
      To achieve this I had to do a surprisingly large amount of refactoring
      of HsSyn, specifically to parameterise HsDecls.TyFamEqn over the type
      of the LHS patterns.
      
      That change in HsDecls has a (trivial) knock-on effect in Haddock, so
      this commit does a submodule update too.
      
      The net result is good though.  The code is simpler; the language
      specification is simpler.  Happy days.
      
      Trac #9263 and #9264 are thereby fixed as well.
      9b8ba629
  8. 12 Jul, 2014 1 commit
  9. 20 Jun, 2014 2 commits
    • Simon Peyton Jones's avatar
      Reject forall types in constraints in signatures · 9c621e9b
      Simon Peyton Jones authored
      Fixes Trac #9196.  Thanks to archblob for an initial stab at this.
      In the end I fixed it in the kind checker rather than the subsequent
      validity check, (a) so that the error messages look more uniform,
      and (b) so that I did not need to meddle with isPredTy.
      9c621e9b
    • Simon Peyton Jones's avatar
      Tidy up the printing of single-predicate contexts · 0ceb84e9
      Simon Peyton Jones authored
      This covers things like
         Eq a => blah   and   (?x::Int) => blah
      where there is just one predicate. Previously we used an ad-hoc
      test to decide whether to parenthesise it, but acutally there is
      a much simpler solution: just use the existing precedence mechamism.
      
      This applies both to Type and HsType.
      0ceb84e9
  10. 11 Jun, 2014 2 commits
  11. 09 Jun, 2014 1 commit
  12. 06 Jun, 2014 1 commit
  13. 04 Jun, 2014 1 commit
  14. 03 Jun, 2014 1 commit
    • Simon Peyton Jones's avatar
      Do pretty-printing of TyThings via IfaceDecl (Trac #7730) · b4856f9f
      Simon Peyton Jones authored
      All the initial work on this was done fy 'archblob' (fcsernik@gmail.com);
      thank you!
      
      I reviewed the patch, started some tidying, up and then ended up in a huge
      swamp of changes, not all of which I can remember now.  But:
      
      * To suppress kind arguments when we have -fno-print-explicit-kinds,
          - IfaceTyConApp argument types are in a tagged list IfaceTcArgs
      
      * To allow overloaded types to be printed with =>, add IfaceDFunTy to IfaceType.
      
      * When printing data/type family instances for the user, I've made them
        print out an informative RHS, which is a new feature. Thus
              ghci> info T
              data family T a
              data instance T Int = T1 Int Int
              data instance T Bool = T2
      
      * In implementation terms, pprIfaceDecl has just one "context" argument,
        of type IfaceSyn.ShowSub, which says
             - How to print the binders of the decl
               see note [Printing IfaceDecl binders] in IfaceSyn
             - Which sub-comoponents (eg constructors) to print
      
      * Moved FastStringEnv from RnEnv to OccName
      
      It all took a ridiculously long time to do.  But it's done!
      b4856f9f
  15. 30 May, 2014 1 commit
  16. 28 Apr, 2014 1 commit
    • Simon Peyton Jones's avatar
      Do type-class defaulting even if there are insoluble constraints · ba2e2014
      Simon Peyton Jones authored
      The argument in Trac #9033 is very compelling: we should not report 20
      errors, fix one, and have the other 19 disappear.  They were spurious
      in the first place.
      
      The fix was easy; do type-class defaulting uncondionally, rather than
      only if there are no insoluble constraints.
      
      See Note [When to do type-class defaulting] in TcSimplify.
      
      Error messages generally improve, especially tc211 which actually
      had an example of precisely this phenomenon.
      ba2e2014
  17. 20 Apr, 2014 1 commit
  18. 19 Apr, 2014 1 commit
  19. 24 Mar, 2014 1 commit
  20. 17 Mar, 2014 1 commit
  21. 14 Mar, 2014 1 commit
    • eir@cis.upenn.edu's avatar
      Remove "Safe mode" check for Coercible instances · 59722295
      eir@cis.upenn.edu authored
      We assume that library authors supply correct role annotations
      for their types, and therefore we do not need to check for
      the availability of data constructors in Safe mode. See
      discussion in #8725. This effectively fixes #8827 and #8826.
      59722295
  22. 07 Mar, 2014 1 commit
  23. 25 Feb, 2014 1 commit
  24. 20 Feb, 2014 1 commit
    • Erik de Castro Lopo's avatar
      Add test case for #8806. · 55cc01a9
      Erik de Castro Lopo authored
      GHC 7.6.3 and earlier should fail to type check this but don't.
      This was fixed some time between the 7.6.3 and the 7.8rc1 release, so
      we're just adding a test to prevent future regressions.
      55cc01a9
  25. 18 Feb, 2014 1 commit
    • Simon Peyton Jones's avatar
      Allow ($) to return an unlifted type (Trac #8739) · 5dd1cbbf
      Simon Peyton Jones authored
      Since ($) simply returns its result, via a tail call, it can
      perfectly well have an unlifted result type; e.g.
          foo $ True    where  foo :: Bool -> Int#
      should be perfectly fine.
      
      This used to work in GHC 7.2, but caused a Lint failure.  This patch
      makes it work again (which involved removing code in TcExpr), but fixing
      the Lint failure meant I had to make ($) into a wired-in Id.  Which
      is not hard to do (in MkId).
      5dd1cbbf
  26. 09 Jan, 2014 1 commit
  27. 28 Dec, 2013 2 commits
  28. 27 Dec, 2013 1 commit
  29. 03 Dec, 2013 1 commit
  30. 02 Dec, 2013 2 commits
  31. 29 Nov, 2013 2 commits
  32. 22 Nov, 2013 3 commits