1. 14 Dec, 2017 4 commits
  2. 13 Dec, 2017 7 commits
    • Gabor Greif's avatar
      Typofix in comment · 6eb32579
      Gabor Greif authored
      6eb32579
    • Simon Peyton Jones's avatar
      Further improvements to well-kinded types · 0a12d92a
      Simon Peyton Jones authored
      The typechecker has the invariant that every type should be well-kinded
      as it stands, without zonking.  See Note [The well-kinded type invariant]
      in TcType.
      
      That invariant was not being upheld, which led to Trac #14174.  I fixed
      part of it, but T14174a showed that there was more.  This patch finishes
      the job.
      
      * See Note [The tcType invariant] in TcHsType, which articulates an
        invariant that was very nearly, but not quite, true.  One place that
        falisified it was the HsWildCardTy case of tc_hs_type, so I fixed that.
      
      * mkNakedCastTy now makes no attempt to eliminate casts; indeed it cannot
        lest it break Note [The well-kinded type invariant].  The prior comment
        suggested that it was crucial for performance but happily it seems not
        to be. The extra Refls are eliminated by the zonker.
      
      * I found I could tidy up TcHsType.instantiateTyN and instantiateTyUntilN
        by eliminating one of its parameters.  That led to a cascade of minor
        improvements in TcTyClsDecls. Hooray.
      0a12d92a
    • Simon Peyton Jones's avatar
      Re-centre perf for T5321Fun · 63e968a9
      Simon Peyton Jones authored
      Bytes allocated has fallen by around 5%. I think this due
      to some of my recent refactoring of the typechecker, but
      I'm not certain about exactly which change did it.
      
      Good though!
      63e968a9
    • Simon Peyton Jones's avatar
      Add missing stderr for Trac #14561 · aef4dee8
      Simon Peyton Jones authored
      aef4dee8
    • Simon Peyton Jones's avatar
      Tidy up of wired-in names · 321b420f
      Simon Peyton Jones authored
      Two things here:
      
      * While debugging Trac #14561 I found it hard to understand
        ghcPrimIds and magicIds in MkId.  This patch adds more
        structure and comments.
      
      * I also discovered that ($) no longer needs to be a wiredInId
        because we now have levity polymorphism.  So I took dollarId
        out of MkId; and gave it a levity-polymorphic type in GHC.Base
      321b420f
    • Simon Peyton Jones's avatar
      Detect levity-polymorphic uses of unsafeCoerce# · e40db7b1
      Simon Peyton Jones authored
      This bug was shown up by Trac #14561. The deguarer carefully
      detects unsaturated and levity-polymorphic uses of primops,
      but not of things like unsafeCoerce#.
      
      The fix is simple: see Note [Levity-polymorphic Ids] in Id.
      e40db7b1
    • Simon Peyton Jones's avatar
      Minor refactor of TcExpr.tcApp · a106a200
      Simon Peyton Jones authored
      This refactoring has no change in behaviour but makes the
      structure clearer
      a106a200
  3. 12 Dec, 2017 1 commit
  4. 11 Dec, 2017 13 commits
  5. 08 Dec, 2017 5 commits
    • Ben Gamari's avatar
      Add hadrian as a submodule · 4335c07c
      Ben Gamari authored
      It will remain a submodule until we are ready to merge Hadrian into the
      tree.
      4335c07c
    • Ben Gamari's avatar
      Rip out hadrian subtree · 7733e44d
      Ben Gamari authored
      Sadly subtrees haven't worked quite as well as we would have liked for
      developers. See Hadrian #440.
      7733e44d
    • Simon Peyton Jones's avatar
      Occurrrence analysis improvements for NOINLINE functions · 5695f462
      Simon Peyton Jones authored
      This patch fixes #14567.  The idea is simple: if a function
      is marked NOINLINE then it makes a great candidate for a loop
      breaker.
      
      Implementation is easy too, but it needs a little extra plubming,
      notably the occ_unf_act field in OccEnv
      5695f462
    • 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
      800009d9
    • 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
      de204409
  6. 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
      fa29df02
      e4a1f032
    • 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
      fa29df02
    • Herbert Valerio Riedel's avatar
      Forward-port changes from GHC 8.2 branch · 5f332e1d
      Herbert Valerio Riedel authored
      (cherry picked from commit 3fa061a6)
      5f332e1d
  7. 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
      1ecbe9cc
    • 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 \
                        --target=x86_64-w64-mingw32
          $ 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
      30d6373e
  8. 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.
      d6fccfb2
    • 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.
      595f60fd
    • 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.
      cfea7450
    • 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
      1acb922b
  9. 01 Dec, 2017 1 commit
    • 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
      bc761ad9