Skip to content
Snippets Groups Projects
  1. May 27, 2019
  2. May 26, 2019
    • isovector's avatar
      Let the specialiser work on dicts under lambdas · 2d0cf625
      isovector authored and Marge Bot's avatar Marge Bot committed
      Following the discussion under #16473, this change allows the
      specializer to work on any dicts in a lambda, not just those that occur
      at the beginning.
      
      For example, if you use data types which contain dictionaries and
      higher-rank functions then once these are erased by the optimiser you
      end up with functions such as:
      
      ```
        go_s4K9
        Int#
        -> forall (m :: * -> *).
           Monad m =>
           (forall x. Union '[State (Sum Int)] x -> m x) -> m ()
      ```
      
      The dictionary argument is after the Int# value argument, this patch
      allows `go` to be specialised.
      2d0cf625
  3. May 25, 2019
  4. May 24, 2019
    • Michael Sloan's avatar
      Add PlainPanic for throwing exceptions without depending on pprint · d9dfbde3
      Michael Sloan authored and Matthew Pickering's avatar Matthew Pickering committed
      This commit splits out a subset of GhcException which do not depend on
      pretty printing (SDoc), as a new datatype called
      PlainGhcException. These exceptions can be caught as GhcException,
      because 'fromException' will convert them.
      
      The motivation for this change is that that the Panic module
      transitively depends on many modules, primarily due to pretty printing
      code.  It's on the order of about 130 modules.  This large set of
      dependencies has a few implications:
      
      1. To avoid cycles / use of boot files, these dependencies cannot
      throw GhcException.
      
      2. There are some utility modules that use UnboxedTuples and also use
      `panic`. This means that when loading GHC into GHCi, about 130
      additional modules would need to be compiled instead of
      interpreted. Splitting the non-pprint exception throwing into a new
      module resolves this issue. See #13101
      d9dfbde3
    • davide's avatar
      Allow metric change after reverting "Add Generic tuple instances up to 15-tuple" #16688 · c931f256
      davide authored
      Metrics increased on commit 5eb94454 and
      decreased on revert commit 535a26c9.
      
      Metric Decrease:
          T9630
          haddock.base
      c931f256
    • Ryan Scott's avatar
      Some forall-related cleanup in deriving code · 6eedbd83
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      * Tweak the parser to allow `deriving` clauses to mention explicit
        `forall`s or kind signatures without gratuitous parentheses.
        (This fixes #14332 as a consequence.)
      * Allow Haddock comments on `deriving` clauses with explicit
        `forall`s. This requires corresponding changes in Haddock.
      6eedbd83
    • Iavor S. Diatchki's avatar
      Add a `NOINLINE` pragma on `someNatVal` (#16586) · 59f4cb6f
      Iavor S. Diatchki authored and Marge Bot's avatar Marge Bot committed
      This fixes #16586, see `Note [NOINLINE someNatVal]` for details.
      59f4cb6f
    • Ömer Sinan Ağacan's avatar
      Add a test for #16597 · 0b449d34
      Ömer Sinan Ağacan authored and Marge Bot's avatar Marge Bot committed
      0b449d34
    • Alp Mestanogullari's avatar
      add an --hadrian mode to ./validate · 04b4b984
      Alp Mestanogullari authored and Marge Bot's avatar Marge Bot committed
      When the '--hadrian' flag is passed to the validate script, we use hadrian
      to build GHC, package it up in a binary distribution and later on run GHC's
      testsuite against the said bindist, which gets installed locally in the process.
      
      Along the way, this commit fixes a typo, an omission (build iserv binaries
      before producing the bindist archive) and moves the Makefile that enables
      'make install' on those bindists from being a list of strings in the code to
      an actual file (it was becoming increasingly annoying to work with).
      
      Finally, the Settings.Builders.Ghc part of this patch is necessary for being
      able to use the installed binary distribution, in 'validate'.
      04b4b984
  5. May 23, 2019
  6. May 22, 2019
    • Luite Stegeman's avatar
      4ba73e00
    • Ryan Scott's avatar
      Use HsTyPats in associated type family defaults · 6efe04de
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      Associated type family default declarations behave strangely in a
      couple of ways:
      
      1. If one tries to bind the type variables with an explicit `forall`,
         the `forall`'d part will simply be ignored. (#16110)
      2. One cannot use visible kind application syntax on the left-hand
         sides of associated default equations, unlike every other form
         of type family equation. (#16356)
      
      Both of these issues have a common solution. Instead of using
      `LHsQTyVars` to represent the left-hand side arguments of an
      associated default equation, we instead use `HsTyPats`, which is what
      other forms of type family equations use. In particular, here are
      some highlights of this patch:
      
      * `FamEqn` is no longer parameterized by a `pats` type variable, as
        the `feqn_pats` field is now always `HsTyPats`.
      * The new design for `FamEqn` in chronicled in
        `Note [Type family instance declarations in HsSyn]`.
      * `TyFamDefltEqn` now becomes the same thing as `TyFamInstEqn`. This
        means that many of `TyFamDefltEqn`'s code paths can now reuse the
        code paths for `TyFamInstEqn`, resulting in substantial
        simplifications to various parts of the code dealing with
        associated type family defaults.
      
      Fixes #16110 and #16356.
      6efe04de
    • Alp Mestanogullari's avatar
      Hadrian: add --test-root-dirs, to only run specific directories of tests · 2c15b85e
      Alp Mestanogullari authored and Marge Bot's avatar Marge Bot committed
      We can specify several of those, by using the flag multiple times or
      just once but combining the directories with ':'.
      
      Along the way, this patch also fixes the testsuite-related --only flag,
      so that we can use it many times instead of being force to specify a
      space-separated list of test in a single --only flag.
      2c15b85e
    • Alec Theriault's avatar
      RTS: Fix restrictive cast · ecc9366a
      Alec Theriault authored and Marge Bot's avatar Marge Bot committed
      Commit e75a9afd added an `unsigned` cast
      to account for OSes that have signed `rlim_t` signed. Unfortunately,
      the `unsigned` cast has the unintended effect of narrowing `rlim_t` to
      only 4 bytes. This leads to some spurious out of memory crashes
      (in particular: Haddock crashes with OOM whenn building docs of
      `ghc`-the-library).
      
      In this case, `W_` is a better type to cast to: we know it will be
      unsigned too and it has the same type as `*len` (so we don't suffer from
      accidental narrowing).
      ecc9366a
    • KevinBuhr's avatar
      Add regression test for old Word32 arithmetic issue (#497) · 78c3f330
      KevinBuhr authored and Marge Bot's avatar Marge Bot committed
      78c3f330
    • Michael Sloan's avatar
      Use datatype for unboxed returns when loading ghc into ghci · ddae344e
      Michael Sloan authored and Marge Bot's avatar Marge Bot committed
      See #13101 and #15454
      ddae344e
    • Michael Sloan's avatar
      Have GHCi use object code for UnboxedTuples modules #15454 · 21272670
      Michael Sloan authored and Marge Bot's avatar Marge Bot committed
      The idea is to automatically enable -fobject-code for modules that use
      UnboxedTuples, along with all the modules they depend on. When looking
      into how to solve this, I was pleased to find that there was already
      highly similar logic for enabling code generation when -fno-code is
      specified but TemplateHaskell is used.
      
      The state before this patch was that if you used unboxed tuples then you
      had to enable `-fobject-code` globally rather than on a per module
      basis.
      21272670
    • Julian Leviston's avatar
      0dc79856
  7. May 21, 2019
  8. May 20, 2019
  9. May 16, 2019
  10. May 14, 2019
    • Alp Mestanogullari's avatar
      Hadrian: 'need' source files for various docs in Rules.Documentation · a416ae26
      Alp Mestanogullari authored
      Previously, changing one of the .rst files from the user guide would not cause
      the user guide to be rebuilt. This patch take a first stab at declaring the
      documentation source files that our documentation rules depend on, focusing
      on the .rst files only for now.
      
      We eventually might want to rebuild docs when we, say, change the haddock style
      file, but this level of tracking isn't really necessary for now.
      
      This fixes #16645.
      a416ae26
Loading