1. 21 Feb, 2020 20 commits
    • Sylvain Henry's avatar
      Hadrian: fix source-dist target (#17849) · e2cce997
      Sylvain Henry authored
      e2cce997
    • Sylvain Henry's avatar
      Make: fix sdist target (#17848) · 3cea6795
      Sylvain Henry authored
      3cea6795
    • Ryan Scott's avatar
      Generalize liftData to work over any Quote (#17857) · 33fa8d94
      Ryan Scott authored
      The Overloaded Quotations proposal generalized the type of `lift`
      to work over any `Quote`, but not the type of `liftData`, leading
      to #17857. Thankfully, generalizing `liftData` is extremely
      straightforward.
      
      Fixes #17857.
      33fa8d94
    • Sylvain Henry's avatar
      Hadrian: minor GMP refactoring · 58175379
      Sylvain Henry authored
      Somehow I forgot to totally remove `gmpContext` in
      d7029cc0. This patch fixes it and adds
      some additional comments.
      58175379
    • Ben Gamari's avatar
      abd7f962
    • Andreas Klebinger's avatar
      Fix #17724 by having occAnal preserve used bindings. · 6de966f1
      Andreas Klebinger authored
      It sometimes happened that occAnal would remove bindings
      as dead code by relying on bindings to be in dependency
      order. The fix was contributed by SPJ.
      6de966f1
    • Ben Gamari's avatar
      Enable -Wstar-is-type in -Wall · 04eb0d6c
      Ben Gamari authored
      As noted in [proposal 0143][proposal] this is supposed to happen in
      8.12.
      
      Also fix an incorrect claim in the users guide that -Wstar-is-type is
      enabled by default.
      
      [proposal]: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0143-remove-star-kind.rst
      04eb0d6c
    • Ben Gamari's avatar
      Use Type instead of * in GHC · 89cb4cc4
      Ben Gamari authored
      89cb4cc4
    • Ben Gamari's avatar
      GHC.Hs.Extension: Use Type instead of * · c5ec9965
      Ben Gamari authored
      c5ec9965
    • Ben Gamari's avatar
      gitlab-ci: Avoid duplicating ~/.cabal contents with every build · f44c7e67
      Ben Gamari authored
      Previously our attempt to cache the cabal store would
      `cp cabal-cache ~/.cabal`. However, if the latter already
       existed this meant that we would end up with
      ~/.cabal/cabal-cache. Not only would this not help caching
      but it would exponentially grow the size of ~/.cabal. Not
      good!
      f44c7e67
    • Ben Gamari's avatar
      05251b17
    • Adam Sandberg Eriksson's avatar
    • Alexis King's avatar
      4e622fca
    • Krzysztof Gogolewski's avatar
      Use TTG for HsSplicedT constructor · 466e1ad5
      Krzysztof Gogolewski authored
      The constructor HsSplicedT occurs only in the GhcTc pass.
      This enforces this fact statically via TTG.
      466e1ad5
    • Roland Senn's avatar
      Fix #17832: Weird handling of exports named main in 8.10-rc1 · 8b76d457
      Roland Senn authored
      Switching from `lookupGlobalOccRn_maybe` to `lookupInfoOccRn`
      to check whether a `main` function is in scope. Unfortunately
      `lookupGlobalOccRn_maybe` complains if there are multiple `main`
      functions in scope.
      8b76d457
    • Ömer Sinan Ağacan's avatar
    • Peter Trommler's avatar
      Fix testsuite on powerpc64le · c8439fc7
      Peter Trommler authored
      Remove expect broken on recomp tests, #11260 was closed
      by !2264 and #11323 most likely by !2264 as well.
      
      GHCi scripts tests work on GHCi but not the external interpreter,
      adjust test configuration accordingly. Fixes unexpected passes.
      
      Mark test requiring DWARF expect fail on powerpc64[le] for #11261.
      c8439fc7
    • Julien Debon's avatar
      doc(List): Add examples to GHC.List · 70a90110
      Julien Debon authored
      * Add examples
      * Cleanup documentation
      * Clarify merge process and Marge bot
      70a90110
    • Sylvain Henry's avatar
      Disentangle DynFlags and SDoc · 6880d6aa
      Sylvain Henry authored
      Remove several uses of `sdocWithDynFlags`. The remaining ones are mostly
      CodeGen related (e.g. depend on target platform constants) and will be
      fixed separately.
      
      Metric Decrease:
         T12425
         T9961
         WWRec
         T1969
         T14683
      6880d6aa
    • Simon Peyton Jones's avatar
      Re-implement unsafe coercions in terms of unsafe equality proofs · 74ad75e8
      Simon Peyton Jones authored
      (Commit message written by Omer, most of the code is written by Simon
      and Richard)
      
      See Note [Implementing unsafeCoerce] for how unsafe equality proofs and
      the new unsafeCoerce# are implemented.
      
      New notes added:
      
      - [Checking for levity polymorphism] in CoreLint.hs
      - [Implementing unsafeCoerce] in base/Unsafe/Coerce.hs
      - [Patching magic definitions] in Desugar.hs
      - [Wiring in unsafeCoerce#] in Desugar.hs
      
      Only breaking change in this patch is unsafeCoerce# is not exported from
      GHC.Exts, instead of GHC.Prim.
      
      Fixes #17443
      Fixes #16893
      
      NoFib
      -----
      
      --------------------------------------------------------------------------------
              Program           Size    Allocs    Instrs     Reads    Writes
      --------------------------------------------------------------------------------
                   CS          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                  CSD          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                   FS          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                    S          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                   VS          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                  VSD          -0.1%      0.0%     -0.0%     -0.0%     -0.1%
                  VSM          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                 anna          -0.0%      0.0%     -0.0%     -0.0%     -0.0%
                 ansi          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                 atom          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               awards          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               banner          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
           bernouilli          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
         binary-trees          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                boyer          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               boyer2          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                 bspt          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
            cacheprof          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
             calendar          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
             cichelli          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
              circsim          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
             clausify          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
        comp_lab_zift          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
             compress          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
            compress2          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
          constraints          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
         cryptarithm1          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
         cryptarithm2          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                  cse          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
         digits-of-e1          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
         digits-of-e2          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               dom-lt          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                eliza          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                event          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
          exact-reals          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               exp3_8          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               expert          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
       fannkuch-redux          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                fasta          -0.1%      0.0%     -0.5%     -0.3%     -0.4%
                  fem          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                  fft          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                 fft2          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
             fibheaps          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                 fish          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                fluid          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               fulsom          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
               gamteb          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                  gcd          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
          gen_regexps          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               genfft          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                   gg          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                 grep          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               hidden          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                  hpg          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                  ida          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                infer          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
              integer          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
            integrate          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
         k-nucleotide          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                kahan          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
              knights          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               lambda          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
           last-piece          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                 lcss          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                 life          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                 lift          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               linear          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
            listcompr          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
             listcopy          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
             maillist          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               mandel          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
              mandel2          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                 mate          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
              minimax          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
              mkhprog          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
           multiplier          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               n-body          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
             nucleic2          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                 para          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
            paraffins          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               parser          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
              parstof          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                  pic          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
             pidigits          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                power          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               pretty          -0.1%      0.0%     -0.1%     -0.1%     -0.1%
               primes          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
            primetest          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               prolog          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               puzzle          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               queens          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
              reptile          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
      reverse-complem          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
              rewrite          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                 rfib          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                  rsa          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                  scc          -0.1%      0.0%     -0.1%     -0.1%     -0.1%
                sched          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                  scs          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               simple          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                solid          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
              sorting          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
        spectral-norm          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               sphere          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
               symalg          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                  tak          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
            transform          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
             treejoin          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
            typecheck          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
              veritas          -0.0%      0.0%     -0.0%     -0.0%     -0.0%
                 wang          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
            wave4main          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
         wheel-sieve1          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
         wheel-sieve2          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
                 x2n1          -0.1%      0.0%     -0.0%     -0.0%     -0.0%
      --------------------------------------------------------------------------------
                  Min          -0.1%      0.0%     -0.5%     -0.3%     -0.4%
                  Max          -0.0%      0.0%     +0.0%     +0.0%     +0.0%
       Geometric Mean          -0.1%     -0.0%     -0.0%     -0.0%     -0.0%
      
      Test changes
      ------------
      
      - break006 is marked as broken, see #17833
      - The compiler allocates less when building T14683 (an unsafeCoerce#-
        heavy happy-generated code) on 64-platforms. Allocates more on 32-bit
        platforms.
      - Rest of the increases are tiny amounts (still enough to pass the
        threshold) in micro-benchmarks. I briefly looked at each one in a
        profiling build: most of the increased allocations seem to be because
        of random changes in the generated code.
      
      Metric Decrease:
          T14683
      
      Metric Increase:
          T12150
          T12234
          T12425
          T13035
          T14683
          T5837
          T6048
      Co-Authored-By: Richard Eisenberg's avatarRichard Eisenberg <rae@cs.brynmawr.edu>
      Co-Authored-By: Ömer Sinan Ağacan's avatarÖmer Sinan Ağacan <omeragacan@gmail.com>
      74ad75e8
  2. 20 Feb, 2020 2 commits
  3. 19 Feb, 2020 6 commits
    • Sylvain Henry's avatar
      Modules: Llvm (#13009) · 1500f089
      Sylvain Henry authored
      1500f089
    • Vladislav Zavialov's avatar
      Fix testsuite driver output (#17847) · 192caf58
      Vladislav Zavialov authored
      192caf58
    • Joshua Price's avatar
      Fix unboxed tuple size limit (#17837) · 5a1ce45d
      Joshua Price authored
      5a1ce45d
    • Vladislav Zavialov's avatar
      Remove the MonadFail P instance · 40d917fb
      Vladislav Zavialov authored
      There were two issues with this instance:
      
      * its existence meant that a pattern match failure in the P monad would
        produce a user-visible parse error, but the error message would not be
        helpful to the user
      
      * due to the MFP migration strategy, we had to use CPP in Lexer.x,
        and that created issues for #17750
      
      Updates haddock submodule.
      40d917fb
    • Sylvain Henry's avatar
      Hadrian: refactor GMP in-tree build support (#17756) · d7029cc0
      Sylvain Henry authored
      * Hadrian doesn't use integer-gmp/config.mk file anymore to determine if
        building GMP in-tree is required.
      
        "config.mk" is created by Cabal when the integer-gmp package is
        configured and this file is still untracked by Hadrian. This led to a
        tricky configure "race" because "config.mk" is built by the
        "setup-config" rule, but this rule is also used to find dependencies,
        in particular the "ghc-gmp.h" header, but the creation of this file
        was depending (without being tracked) on "config.mk".
      
        Now Hadrian only builds in-tree GMP if `--with-intree-gmp` is passed
        to the top-level configure script.
      
      * in-tree GMP isn't built once for all in a fixed stage (Stage1)
        anymore. It is built per stage which is required if we build a
        cross-compiler
      
      * switching between in-tree and external GMP is now supported without
        having to clean the build directory first.
      
      * "wrappers.c" now includes "ghc-gmp.h" instead of "ghc.h". It
        helps ensuring that the build system generates "ghc-gmp.h".
      
      * build in-tree GMP in "<root>/stageN/gmp/gmpbuild" and produce useful
        artefacts (libgmp.a, gmp.h, objs/*.o) in "<root>/stageN/gmp"
      d7029cc0
    • Roland Senn's avatar
      If a :reload finds syntax errors in the module graph, remove the loaded modules. (Fixes #17549) · b4a8ce52
      Roland Senn authored
      The processing in `compiler/main/GhcMake.hs` computes the ModuleGraph. If it finds errors
      in the module header or in the import specifications, then the new module graph is
      incomplete and should not be used.
      The code before #17549 just reported the errors and left the old ModuleGraph in place.
      The new code of this MR replaces the old ModuleGraph with an empty one.
      b4a8ce52
  4. 16 Feb, 2020 3 commits
  5. 15 Feb, 2020 2 commits
    • Ben Gamari's avatar
      785008c1
    • Ben Gamari's avatar
      Accept performance changes · e77818de
      Ben Gamari authored
      These manifested in the integer-simple job.
      
      Metric Decrease:
          T12227
          T5549
          T14936
          T4830
          Conversions
          T5237
          T8766
          T4801
          T10359
      
      Metric Increase:
          T12234
          T6048
          T3294
          T14683
          T3064
          T9872b
          T9872c
          T783
          T5837
          T10678
          T14697
          T5631
          T9203
          T13719
          T12707
          T13056
          T9630
          T10547
          T9872d
          T1969
          WWRec
          T10370
          T5321FD
          haddock.Cabal
          T5642
          T9872a
          T15263
          T12425
          MultiLayerModules
          T5205
          T9233
          T13379
          haddock.base
          T9020
          T13035
          T12150
          T9961
      e77818de
  6. 14 Feb, 2020 7 commits