1. 08 Dec, 2017 2 commits
    • Simon Peyton Jones's avatar
      Improve LiberateCase · 800009d9
      Simon Peyton Jones authored
      This patch, which fixes Trac #14566, makes LiberateCase a little
      more conservative.  In particular:
      * In libCaseBind, treat a recursive group as a whole, rather than
        binding-by-binding, allowing the group to be duplicated only if
          - the bindings /considered together/ are smaller than the
            liberate-case threshold (which is large by default)
          - none of them are thunks
          - none of them are guaranteed-diverging
        The latter condidtion is new, and happens to apply in the
        case of Data/Typeable/Internal.mkTrApp
    • Simon Peyton Jones's avatar
      Refactor kcHsTyVarBndrs · de204409
      Simon Peyton Jones authored
      This refactoring
      * Renames kcHsTyVarBndrs to kcLHsQTyVars,
        which is more truthful. It is only used in getInitialKind.
      * Pulls out bind_telescope from that function, and calls it
        kcLHsTyVarBndrs, again to reflect its argument
      * Uses the new kcLHsTyVarBndrs in kcConDecl, where the old
        function was wild overkill.
      There should not be any change in behaviour
  2. 07 Dec, 2017 3 commits
    • Herbert Valerio Riedel's avatar
      Revert accidental hsc2hs submodule downgrade · e4a1f032
      Herbert Valerio Riedel authored
      This submodule update was committed unintentionally in
    • Simon Peyton Jones's avatar
      Refactor ConDecl: Trac #14529 · fa29df02
      Simon Peyton Jones authored
      This patch refactors HsDecls.ConDecl.  Specifically
      * ConDeclGADT was horrible, with all the information hidden
        inside con_res_ty.  Now it's kept separate, as it should be.
      * ConDeclH98: use [LHsTyVarBndr] instead of LHsQTyVars for the
        existentials. There is no implicit binding here.
      * Add a field con_forall to both ConDeclGADT and ConDeclH98
        which says if there is an explicit user-written forall.
      * Field renamings in ConDecl
           con_cxt     to con_mb_cxt
           con_details to con_args
      There is an accompanying submodule update to Haddock.
      Also the following change turned out to remove a lot of clutter:
      * add a smart constructor for HsAppsTy, namely mkHsAppsTy,
        and use it consistently. This avoids a lot of painful pattern
        matching for the common singleton case.
      Two api-annotation tests (T10278, and T10399) are broken, hence marking
      them as expect_broken(14529).  Alan is going to fix them, probably by
      changing the con_forall field to
         con_forall :: Maybe SrcSpan
      instead of Bool
    • Herbert Valerio Riedel's avatar
      Forward-port changes from GHC 8.2 branch · 5f332e1d
      Herbert Valerio Riedel authored
      (cherry picked from commit 3fa061a6)
  3. 05 Dec, 2017 2 commits
    • Sergei Trofimovich's avatar
      utils/hsc2hs: update submodule · 1ecbe9cc
      Sergei Trofimovich authored
      This pulls single change to fix building of cross-compilers:
      * ghc.mk: Use the same conditional install logic from unlit
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      Reviewers: bgamari
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4248
    • Sergei Trofimovich's avatar
      rts: fix filename case for mingw32 target · 30d6373e
      Sergei Trofimovich authored
      The failure is visible when we build a cross-compiler
      from linux to mingw32 as:
          $ ./configure --host=x86_64-pc-linux-gnu \
          $ make
          rts/linker/PEi386.c:159:10: error:
               fatal error: Psapi.h: No such file or directory
               #include <Psapi.h>
          159 | #include <Psapi.h>
              |          ^
      The problem here is case-sensitive linux filesystem. On windows
      it does not matter what case is used for includes and libraries.
      mingw32 provides all libraries and headers lowercase. This change
      fixes case for <dbghelp.h>, <psapi.h>, -ldbghelp, -lpsapi.
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      Reviewers: bgamari, erikd, simonmar
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4247
  4. 04 Dec, 2017 4 commits
    • Ben Gamari's avatar
      Bump version to 8.5 · d6fccfb2
      Ben Gamari authored
      The ghc-8.4 branch has now been cut. Updates the haddock submodule.
    • Ben Gamari's avatar
      Fix ghc_packages · 595f60fd
      Ben Gamari authored
      The LaTeX produced by this previously failed to compile. Changing the first cell
      of the row from an inline to a paragraph fixes this. Then I noticed that the
      table overflowed the page. This is fixed by applying the longtable class.
    • Ben Gamari's avatar
      template-haskell: Rip out FamFlavour · cfea7450
      Ben Gamari authored
      This was scheduled to happen for 8.2, it looks like it will actually
      happen in 8.4.
    • David Feuer's avatar
      Make the Con and Con' patterns produce evidence · 1acb922b
      David Feuer authored
      Matching with the `Con` and `Con'` patterns can reveal evidence
      that the type in question is *not* an application. This can help
      the pattern checker.
      Reviewers: austin, hvr, bgamari
      Reviewed By: bgamari
      Subscribers: carter, rwbarton, thomie
      Differential Revision: https://phabricator.haskell.org/D4139
  5. 01 Dec, 2017 4 commits
    • David Feuer's avatar
      Cache TypeRep kinds aggressively · bc761ad9
      David Feuer authored
      Cache `TypeRep k` in each `TrApp` or `TrTyCon` constructor of
      `TypeRep (a :: k)`. This makes `typeRepKind` cheap.
      With this change, we won't need any special effort to deserialize
      typereps efficiently. The downside, of course, is that we make
      `TypeRep`s slightly larger.
      Reviewers: austin, hvr, bgamari, simonpj
      Reviewed By: bgamari, simonpj
      Subscribers: carter, simonpj, rwbarton, thomie
      GHC Trac Issues: #14254
      Differential Revision: https://phabricator.haskell.org/D4085
    • David Feuer's avatar
      Add trace injection · 12efb230
      David Feuer authored
      Add support for injecting runtime calls to `trace` in `DsM`. This
      allows the desugarer to add compile-time information to a runtime
      Reviewers: austin, hvr, bgamari
      Reviewed By: bgamari
      Subscribers: carter, thomie, rwbarton
      Differential Revision: https://phabricator.haskell.org/D4162
    • Edward Z. Yang's avatar
      Handle CPP properly in Backpack · e1fb2838
      Edward Z. Yang authored
      Previously, we attempted to lookup 'hole' packages for
      include directories; this obviously is not going to work.
      Signed-off-by: Edward Z. Yang's avatarEdward Z. Yang <ezyang@fb.com>
      Test Plan: validate
      Reviewers: ekmett, bgamari
      Subscribers: rwbarton, thomie
      GHC Trac Issues: #14525
      Differential Revision: https://phabricator.haskell.org/D4234
    • Edward Z. Yang's avatar
      Make use of boot TyThings during typechecking. · 69987720
      Edward Z. Yang authored
      Suppose that you are typechecking A.hs, which transitively imports,
      via B.hs, A.hs-boot.  When we poke on B.hs and discover that it
      has a reference to a type from A, what TyThing should we wire
      it up with?  Clearly, if we have already typechecked A, we
      should use the most up-to-date TyThing: the one we freshly
      generated when we typechecked A.  But what if we haven't typechecked
      it yet?
      For the longest time, GHC adopted the policy that this was
      *an error condition*; that you MUST NEVER poke on B.hs's reference
      to a thing defined in A.hs until A.hs has gotten around to checking
      this.  However, actually ensuring this is the case has proven
      to be a bug farm.  The problem was especially poignant with
      type family consistency checks, which eagerly happen before
      any typechecking takes place.
      This patch takes a different strategy: if we ever try to access
      an entity from A which doesn't exist, we just fall back on the
      definition of A from the hs-boot file.  This means that you may
      end up with a mix of A.hs and A.hs-boot TyThings during the
      course of typechecking.
      Signed-off-by: Edward Z. Yang's avatarEdward Z. Yang <ezyang@fb.com>
      Test Plan: validate
      Reviewers: simonpj, bgamari, austin, goldfire
      Subscribers: thomie, rwbarton
      GHC Trac Issues: #14396
      Differential Revision: https://phabricator.haskell.org/D4154
  6. 29 Nov, 2017 7 commits
  7. 28 Nov, 2017 12 commits
  8. 27 Nov, 2017 6 commits