1. 03 May, 2019 8 commits
    • Ryan Scott's avatar
      Make equality constraints in kinds invisible · cc495d57
      Ryan Scott authored
      Issues #12102 and #15872 revealed something strange about the way GHC
      handles equality constraints in kinds: it treats them as _visible_
      arguments! This causes a litany of strange effects, from strange
      error messages
      (ghc/ghc#12102 (comment 169035))
      to bizarre `Eq#`-related things leaking through to GHCi output, even
      without any special flags enabled.
      
      This patch is an attempt to contain some of this strangeness.
      In particular:
      
      * In `TcHsType.etaExpandAlgTyCon`, we propagate through the
        `AnonArgFlag`s of any `Anon` binders. Previously, we were always
        hard-coding them to `VisArg`, which meant that invisible binders
        (like those whose kinds were equality constraint) would mistakenly
        get flagged as visible.
      * In `ToIface.toIfaceAppArgsX`, we previously assumed that the
        argument to a `FunTy` always corresponding to a `Required`
        argument. We now dispatch on the `FunTy`'s `AnonArgFlag` and map
        `VisArg` to `Required` and `Inv...
      cc495d57
    • Ömer Sinan Ağacan's avatar
      Fix interface version number printing in --show-iface · 87bc954a
      Ömer Sinan Ağacan authored
      Before
      
          Version: Wanted [8, 0, 9, 0, 2, 0, 1, 9, 0, 4, 2, 5],
                   got    [8, 0, 9, 0, 2, 0, 1, 9, 0, 4, 2, 5]
      
      After
      
          Version: Wanted 809020190425,
                   got    809020190425
      87bc954a
    • Ningning Xie's avatar
      9b59e126
    • Vladislav Zavialov's avatar
      Pattern/expression ambiguity resolution · 52fc2719
      Vladislav Zavialov authored
      This patch removes 'EWildPat', 'EAsPat', 'EViewPat', and 'ELazyPat'
      from 'HsExpr' by using the ambiguity resolution system introduced
      earlier for the command/expression ambiguity.
      
      Problem: there are places in the grammar where we do not know whether we
      are parsing an expression or a pattern, for example:
      
      	do { Con a b <- x } -- 'Con a b' is a pattern
      	do { Con a b }      -- 'Con a b' is an expression
      
      Until we encounter binding syntax (<-) we don't know whether to parse
      'Con a b' as an expression or a pattern.
      
      The old solution was to parse as HsExpr always, and rejig later:
      
      	checkPattern :: LHsExpr GhcPs -> P (LPat GhcPs)
      
      This meant polluting 'HsExpr' with pattern-related constructors. In
      other words, limitations of the parser were affecting the AST, and all
      other code (the renamer, the typechecker) had to deal with these extra
      constructors.
      
      We fix this abstraction leak by parsing into an overloaded
      representation:
      
      	class DisambECP b where ...
      	newtype ECP = ...
      52fc2719
    • Alp Mestanogullari's avatar
      Hadrian: generate JUnit testsuite report in Linux CI job · 8f929388
      Alp Mestanogullari authored
      We also keep it as an artifact, like we do for non-Hadrian jobs, and list it
      as a junit report, so that the test results are reported in the GitLab UI for
      merge requests.
      8f929388
    • Ben Gamari's avatar
      testsuite: Mark concprog001 as fragile · 0dde64f2
      Ben Gamari authored
      Due to #16604.
      0dde64f2
    • Shayne Fletcher's avatar
      Make Extension derive Bounded · 9047f184
      Shayne Fletcher authored
      9047f184
    • Sven Tennie's avatar
      Typeset Big-O complexities with Tex-style notation (#16090) · 4186b410
      Sven Tennie authored
      Use `\min` instead of `min` to typeset it as an operator.
      4186b410
  2. 01 May, 2019 7 commits
    • Ben Gamari's avatar
      Emit GHC timing events to eventlog · ebfa3528
      Ben Gamari authored
      ebfa3528
    • Ben Gamari's avatar
      ErrUtils: Emit progress messages to eventlog · 1bef62c3
      Ben Gamari authored
      1bef62c3
    • Alp Mestanogullari's avatar
    • John Ericson's avatar
      Move cGHC_UNLIT_PGM to be "unlit command" in settings · 2988ef5e
      John Ericson authored
      The bulk of the work was done in #712, making settings be make/Hadrian
      controlled. This commit then just moves the unlit command rules in
      make/Hadrian from the `Config.hs` generator to the `settings` generator
      in each build system.
      
      I think this is a good change because the crucial benefit is *settings*
      don't affect the build: ghc gets one baby step closer to being a regular
      cabal executable, and make/Hadrian just maintains settings as part of
      bootstrapping.
      2988ef5e
    • John Ericson's avatar
      Remove settings.in · 53d1cd96
      John Ericson authored
      It is no longer needed
      53d1cd96
    • John Ericson's avatar
      Generate settings by make/hadrian instead of configure · d37d91e9
      John Ericson authored
      This allows it to eventually become stage-specific
      d37d91e9
    • Sebastian Graf's avatar
      Compute demand signatures assuming idArity · 014ed644
      Sebastian Graf authored
      This does four things:
      
      1. Look at `idArity` instead of manifest lambdas to decide whether to use LetUp
      2. Compute the strictness signature in LetDown assuming at least `idArity`
         incoming arguments
      3. Remove the special case for trivial RHSs, which is subsumed by 2
      4. Don't perform the W/W split when doing so would eta expand a binding.
         Otherwise we would eta expand PAPs, causing unnecessary churn in the
         Simplifier.
      
      NoFib Results
      
      --------------------------------------------------------------------------------
              Program         Allocs    Instrs
      --------------------------------------------------------------------------------
       fannkuch-redux          +0.3%      0.0%
                   gg          -0.0%     -0.1%
             maillist          +0.2%     +0.2%
              minimax           0.0%     +0.8%
               pretty           0.0%     -0.1%
              reptile          -0.0%     -1.2%
      --------------------------------------------------------------------------------
        ...
      014ed644
  3. 30 Apr, 2019 7 commits
  4. 25 Apr, 2019 6 commits
  5. 24 Apr, 2019 1 commit
  6. 23 Apr, 2019 2 commits
  7. 22 Apr, 2019 3 commits
    • Vladislav Zavialov's avatar
      Stop misusing EWildPat in pattern match coverage checking · 1959bad3
      Vladislav Zavialov authored
      EWildPat is a constructor of HsExpr used in the parser to represent
      wildcards in ambiguous positions:
      
      * in expression context, EWildPat is turned into hsHoleExpr (see rnExpr)
      * in pattern context, EWildPat is turned into WildPat (see checkPattern)
      
      Since EWildPat exists solely for the needs of the parser, we could
      remove it by improving the parser.
      
      However, EWildPat has also been used for a different purpose since
      8a506104: to represent patterns that the coverage checker cannot handle.
      Not only this is a misuse of EWildPat, it also stymies the removal of
      EWildPat.
      1959bad3
    • Alp Mestanogullari's avatar
      Hadrian: use the testsuite driver's config.haddock arg more correctly · 51655fd8
      Alp Mestanogullari authored
      4 haddock tests assume that .haddock files have been produced, by using the
      'req_haddock' modifier. The testsuite driver assumes that this condition is
      satisfied if 'config.haddock' is non-empty, but before this patch Hadrian was
      always passing the path to where the haddock executable should be, regardless
      of whether it is actually there or not.
      
      Instead, we now pass an empty config.haddock when we can't find all of
      <build root>/docs/html/libraries/<pkg>/<pkg>.haddock>, where <pkg> ranges over
      array, base, ghc-prim, process and template-haskell, and pass the path
      to haddock when all those file exists. This has the (desired) effect of skipping
      the 4 tests (marked as 'missing library') when the docs haven't been built,
      and running the haddock tests when they have.
      51655fd8
    • Matthew Pickering's avatar
      Correct off by one error in ghci +c · 1a7a329b
      Matthew Pickering authored
      Fixes #16569
      1a7a329b
  8. 21 Apr, 2019 6 commits