1. 14 Jul, 2019 3 commits
  2. 13 Jul, 2019 4 commits
  3. 12 Jul, 2019 2 commits
    • Shayne Fletcher's avatar
      Add shake 0.18.3 to extra deps · de3935a6
      Shayne Fletcher authored
      de3935a6
    • Simon Peyton Jones's avatar
      Fix kind-checking for data/newtypes · e4c73514
      Simon Peyton Jones authored
      In one spot in kcConDecl we were passing in the return
      kind signature rether than the return kind. e.g. #16828
      
         newtype instance Foo :: Type -> Type where
           MkFoo :: a -> Foo a
      
      We were giving kcConDecl the kind (Type -> Type), whereas it
      was expecting the ultimate return kind, namely Type.
      
      This "looking past arrows" was being done, independently,
      in several places, but we'd missed one.  This patch moves it all
      to one place -- the new function kcConDecls (note the plural).
      
      I also took the opportunity to rename
        tcDataFamHeader  to   tcDataFamInstHeader
      
      (The previous name was consistently a source of confusion.)
      e4c73514
  4. 11 Jul, 2019 6 commits
  5. 10 Jul, 2019 13 commits
    • Simon Peyton Jones's avatar
      Fix erroneous float in CoreOpt · d2e290d3
      Simon Peyton Jones authored
      The simple optimiser was making an invalid transformation
      to join points -- yikes.  The fix is easy.
      
      I also added some documentation about the fact that GHC uses
      a slightly more restrictive version of join points than does
      the paper.
      
      Fix #16918
      d2e290d3
    • Ben Gamari's avatar
      hadrian/doc: Add some discussion of compilation stages · a35e0916
      Ben Gamari authored
      This documents some of the lore surrounding the nature and naming of
      GHC's stage numbers.
      a35e0916
    • Eric Wolf's avatar
      T16804: adjust src spans · 8fcc931c
      Eric Wolf authored
      8fcc931c
    • Eric Wolf's avatar
      Add testcase T16804 for #16804 · 85da17e5
      Eric Wolf authored
      slightly larger testcase for :type-at and :uses
      so we can see changes, if #16804 is done.
      85da17e5
    • Ömer Sinan Ağacan's avatar
      Minor refactoring in CoreSimpl · 897a59a5
      Ömer Sinan Ağacan authored
      When `join_ids` is empty `extendVarSetList existing_joins join_ids` is
      already no-op, so no need to check whether `join_ids` is empty or not
      before extending the joins set.
      897a59a5
    • Ömer Sinan Ağacan's avatar
      Testsuite tweaks and refactoring · d7423f10
      Ömer Sinan Ağacan authored
      - Rename requires_th to req_th for consistency with other req functions
        (e.g. req_interp, req_profiling etc.)
      
      - req_th (previously requires_th) now checks for interpreter (via
        req_interp). With this running TH tests are skipped when running the
        test suite with stage=1.
      
      - Test tweaks:
          - T9360a, T9360b: Use req_interp
          - recomp009, T13938, RAE_T32a: Use req_th
      
      - Fix check-makefiles linter: it now looks for Makefiles instead of .T
        files (which are actually Python files)
      d7423f10
    • Alp Mestanogullari's avatar
      Hadrian: fix source-dist rule · 7f8bf98e
      Alp Mestanogullari authored
      The first problem was that the list of files/dirs to embed or ignore was not
      up-to-date. The second problem was that the 'Cwd' option used when running the
      Tar builder in the source-dist rule didn't actually change the current directory
      and was therefore failing. Finally, the source-dist rule did not pre-generate
      Haskell modules derived from .x (alex) and .y (happy) files, like the Make
      build system does -- this is now fixed.
      
      We might be doing too much work for that last step (we seem to be building
      many things until we get to generating the source distribution), but extracting
      the distribution and running
      
          ./configure && hadrian/build.sh --flavour=quickest -j
      
      from there does work for me now.
      7f8bf98e
    • Alp Mestanogullari's avatar
      Hadrian: implement key-value settings for builder options · 18ac9ad4
      Alp Mestanogullari authored
      They take the general form `foo.bar.baz [+]= some values`, where
      `=` completely overrides the arguments for a builder and `+=` extends
      them. We currenly only support settings for updating the GHC and C
      compiler options, of the form:
      
      ```
        {stage0, ..., stage3 or *}.{package name or *}
                                  .ghc.{c, hs, link, deps, toolargs or *}.opts
      
        {stage0, ..., stage3 or *}.{package name or *}
                                  .cc.{c, deps or *}.opts
      ```
      
      The supported settings and their use is covered in the new section
      of `hadrian/doc/user-settings.md`, while the implementation is explained
      in a new Note [Hadrian settings].
      
      Most of the logic is implemented in a new module, `Settings.Parser`, which
      contains key-value assignment/extension parsers as well as utilities for
      specifying allowed settings at a high-level, generating a `Predicate` from
      such a description or generating the list of possible completions for a given
      string.
      
      The additions to the `Settings` module make use of this to describe the
      settings that Hadrian currently supports, and apply all such
      key-value settings (from the command line and `<root>/hadrian.settings`)
      to the flavour that Hadrian is going to proceed with.
      
      This new setting system comes with support for generating Bash completions,
      implemented in `hadrian/completion.sh` and Hadrian's `autocomplete` target:
      
      > source hadrian/completion.sh
      > hadrian/build.sh stage1.base.ghc.<TAB>
      stage1.base.ghc.c.opts     stage1.base.ghc.hs.opts
      stage1.base.ghc.*.opts     stage1.base.ghc.deps.opts
      stage1.base.ghc.link.opts  stage1.base.ghc.toolargs.opts
      18ac9ad4
    • Ben Gamari's avatar
      testsuite: Fix #16818 · 42ff8653
      Ben Gamari authored
      Renames performance metrics to include whether they are compile-time or
      runtime metrics.
      42ff8653
    • John Ericson's avatar
      Deduplicate "unique subdir" code between GHC and Cabal · 24782b89
      John Ericson authored
      The code, including the generated module with the version, is now in
      ghc-boot. Config.hs reexports stuff as needed, ghc-pkg doesn't need any
      tricks at all.
      24782b89
    • John Ericson's avatar
      Remove most uses of TARGET platform macros · 0472f0f6
      John Ericson authored
      These prevent multi-target builds. They were gotten rid of in 3 ways:
      
      1. In the compiler itself, replacing `#if` with runtime `if`. In these
      cases, we care about the target platform still, but the target platform
      is dynamic so we must delay the elimination to run time.
      
      2. In the compiler itself, replacing `TARGET` with `HOST`. There was
      just one bit of this, in some code splitting strings representing lists
      of paths. These paths are used by GHC itself, and not by the compiled
      binary. (They are compiler lookup paths, rather than RPATHS or something
      that does matter to the compiled binary, and thus would legitamentally
      be target-sensative.) As such, the path-splitting method only depends on
      where GHC runs and not where code it produces runs. This should have
      been `HOST` all along.
      
      3. Changing the RTS. The RTS doesn't care about the target platform,
      full stop.
      
      4. `includes/stg/HaskellMachRegs.h` This file is also included in the
      genapply executable. This is tricky because the RTS's host platform
      really is that utility's target platform. so that utility really really
      isn't multi-target either. But at least it isn't an installed part of
      GHC, but just a one-off tool when building the RTS. Lying with the
      `HOST` to a one-off program (genapply) that isn't installed doesn't seem so bad.
      It's certainly better than the other way around of lying to the RTS
      though not to genapply. The RTS is more important, and it is installed,
      *and* this header is installed as part of the RTS.
      0472f0f6
    • John Ericson's avatar
      Fix two more `#ifndef` for the linter · fb43bddc
      John Ericson authored
      fb43bddc
    • Phuong Trinh's avatar
      Fix #16511: changes in interface dependencies should trigger recompilation · b05c8423
      Phuong Trinh authored
      If the union of dependencies of imported modules change, the `mi_deps`
      field of the interface files should change as well. Because of that, we
      need to check for changes in this in recompilation checker which we are
      not doing right now. This adds a checks for that.
      b05c8423
  6. 09 Jul, 2019 1 commit
    • Ryan Scott's avatar
      Use an empty data type in TTG extension constructors (#15247) · 6a03d77b
      Ryan Scott authored
      To avoid having to `panic` any time a TTG extension constructor is
      consumed, this MR introduces an uninhabited 'NoExtCon' type and uses
      that in every extension constructor's type family instance where it
      is appropriate. This also introduces a 'noExtCon' function which
      eliminates a 'NoExtCon', much like 'Data.Void.absurd' eliminates
      a 'Void'.
      
      I also renamed the existing `NoExt` type to `NoExtField` to better
      distinguish it from `NoExtCon`. Unsurprisingly, there is a lot of
      code churn resulting from this.
      
      Bumps the Haddock submodule. Fixes #15247.
      6a03d77b
  7. 08 Jul, 2019 2 commits
  8. 05 Jul, 2019 9 commits
    • Alex D's avatar
    • Ryan Scott's avatar
      More sensible SrcSpans for recursive pattern synonym errors (#16900) · 62b82135
      Ryan Scott authored
      Attach the `SrcSpan` of the first pattern synonym binding involved in
      the recursive group when throwing the corresponding error message,
      similarly to how it is done for type synonyms.
      
      Fixes #16900.
      62b82135
    • Artem Pelenitsyn's avatar
      Make all submodules have absolute URLs · a76b233d
      Artem Pelenitsyn authored
      The relative URLs were a workaround to let most contributors fork from
      Github due to a weakness in the haskell.org server.
      
      This workaround is no longer needed. And relative submodule URLs are
      an impediment to forking which makes contributions harder than they
      should be.
      
      The URLs are chosen to clone from https, because this makes sure that
      anybody, even not a registered Gitlab user, can clone a fork
      recursively.
      a76b233d
    • Andreas Klebinger's avatar
      Dont gather ticks when only striping them in STG. · f002250a
      Andreas Klebinger authored
      Adds stripStgTicksTopE which only returns the stripped expression.
      So far we also allocated a list for the stripped ticks which was
      never used.
      
      Allocation difference is as expected very small but present.
      About 0.02% difference when compiling with -O.
      f002250a
    • Simon Peyton Jones's avatar
      Fix over-eager implication constraint discard · 80afdf6b
      Simon Peyton Jones authored
      Ticket #16247 showed that we were discarding an implication
      constraint that had empty ic_wanted, when we still needed to
      keep it so we could check whether it had a bad telescope.
      
      Happily it's a one line fix.  All the rest is comments!
      80afdf6b
    • Daniel Gröber (dxld)'s avatar
      rts: Fix -hT option with profiling rts · ed662901
      Daniel Gröber (dxld) authored
      In dumpCensus we switch/case on doHeapProfile twice. The second switch
      tries to barf on unknown doHeapProfile modes but HEAP_BY_CLOSURE_TYPE is
      checked by the first switch and not included in the second.
      
      So when trying to pass -hT to the profiling rts it barfs.
      
      This commit simply merges the two switches into one which fixes this
      problem.
      ed662901
    • Simon Peyton Jones's avatar
      Add a missing zonk (fixes #16902) · 53aa59f3
      Simon Peyton Jones authored
      In the eager unifier, when unifying (tv1 ~ tv2),
      when we decide to swap them over, to unify (tv2 ~ tv1),
      I'd forgotten to ensure that tv1's kind was fully zonked,
      which is an invariant of uUnfilledTyVar2.
      
      That could lead us to build an infinite kind, or (in the
      case of #16902) update the same unification variable twice.
      
      Yikes.
      
      Now we get an error message rather than non-termination,
      which is much better.  The error message is not great,
      but it's a very strange program, and I can't see an easy way
      to improve it, so for now I'm just committing this fix.
      
      Here's the decl
       data F (a :: k) :: (a ~~ k) => Type where
          MkF :: F a
      
      and the rather error message of which I am not proud
      
        T16902.hs:11:10: error:
          • Expected a type, but found something with kind ‘a1’
          • In the type ‘F a’
      53aa59f3
    • Vladislav Zavialov's avatar
      Produce all DerivInfo in tcTyAndClassDecls · 679427f8
      Vladislav Zavialov authored
      Before this refactoring:
      
      * DerivInfo for data family instances was returned from tcTyAndClassDecls
      * DerivInfo for data declarations was generated with mkDerivInfos and added at a
        later stage of the pipeline in tcInstDeclsDeriv
      
      After this refactoring:
      
      * DerivInfo for both data family instances and data declarations is returned from
        tcTyAndClassDecls in a single list.
      
      This uniform treatment results in a more convenient arrangement to fix #16731.
      679427f8
    • Ben Gamari's avatar
      gitlab: Reduce size of template headings · 675d27fc
      Ben Gamari authored
      675d27fc