1. 20 Dec, 2016 1 commit
  2. 19 Dec, 2016 1 commit
  3. 18 Dec, 2016 1 commit
  4. 17 Dec, 2016 1 commit
    • Rufflewind's avatar
      Windows: Improve terminal detection mechanism · 3dbd2b09
      Rufflewind authored
      The previous detection mechanism allowed environment variables (ANSICON,
      ConEmuANSI, TERM) to supersede the fact that the stderr is not a
      terminal, which is probably what led to color codes appearing in the
      stderr of the tests (see: 847d2293).
      
      This commit changes the detection mechanism to detect Cygwin/MSYS2
      terminals in a more reliable manner, avoiding the use of environment
      variables entirely.
      
      Test Plan: validate
      
      Reviewers: Phyx, austin, erikd, bgamari
      
      Reviewed By: Phyx, bgamari
      
      Subscribers: RyanGlScott, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2809
      3dbd2b09
  5. 16 Dec, 2016 1 commit
  6. 15 Dec, 2016 1 commit
  7. 11 Dec, 2016 1 commit
    • Moritz Angermann's avatar
      Make globals use sharedCAF · c3c70244
      Moritz Angermann authored
      Summary:
      The use of globals is quite painful when multiple rts are loaded, e.g.
      when plugins are loaded, which bring in a second rts. The sharedCAF
      appraoch was employed for the FastStringTable; I've taken the libery
      to extend this to the other globals I could find.
      
      This is a reboot of D2575, that should hopefully not exhibit the same
      windows build issues.
      
      Reviewers: Phyx, simonmar, goldfire, bgamari, austin, hvr, erikd
      
      Reviewed By: Phyx, simonmar, bgamari
      
      Subscribers: mpickering, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2773
      c3c70244
  8. 09 Dec, 2016 3 commits
    • Sylvain Henry's avatar
      Export `warningGroups' and `warningHierarchies' · 1c296c0c
      Sylvain Henry authored
      Reviewers: austin, mpickering, bgamari
      
      Reviewed By: mpickering, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2806
      1c296c0c
    • Rufflewind's avatar
      Disable colors unless printing to stderr · cee72d5c
      Rufflewind authored
      Only print colors when mkLocMessageAnn is called directly from
      defaultLogAction.  This prevents ANSI error codes from cluttering up the
      dump files.
      
      Test Plan: validate
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2792
      
      GHC Trac Issues: #12927
      cee72d5c
    • Sylvain Henry's avatar
      Scrutinee Constant Folding · d3b546b1
      Sylvain Henry authored
      This patch introduces new rules to perform constant folding through
      case-expressions.
      
      E.g.,
      ```
      case t -# 10# of _ {  ===> case t of _ {
               5#      -> e1              15#     -> e1
               8#      -> e2              18#     -> e2
               DEFAULT -> e               DEFAULT -> e
      ```
      
      The initial motivation is that it allows "Merge Nested Cases"
      optimization to kick in and to further simplify the code
      (see Trac #12877).
      
      Currently we recognize the following operations for Word# and Int#: Add,
      Sub, Xor, Not and Negate (for Int# only).
      
      Test Plan: validate
      
      Reviewers: simonpj, austin, bgamari
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2762
      
      GHC Trac Issues: #12877
      d3b546b1
  9. 01 Dec, 2016 1 commit
  10. 30 Nov, 2016 3 commits
  11. 29 Nov, 2016 4 commits
    • Moritz Angermann's avatar
      Make globals use sharedCAF · 6f7ed1e5
      Moritz Angermann authored
      The use of globals is quite painful when multiple rts are loaded, e.g.
      when plugins are loaded, which bring in a second rts. The sharedCAF
      appraoch was employed for the FastStringTable; I've taken the libery
      to extend this to the other globals I could find.
      
      Reviewers: rwbarton, simonmar, austin, hvr, erikd, bgamari
      
      Reviewed By: simonmar, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2575
      6f7ed1e5
    • Sylvain Henry's avatar
      Replace -fshow-source-paths with -fhide-source-paths · 3ec85630
      Sylvain Henry authored
      This patch reverts the change introduced with
      587dcccf and restores the previous
      default output of GHC (i.e., show source path and object path for each
      compiled module).
      
      The -fhide-source-paths flag can be used to hide these paths and reduce
      the line
      noise.
      
      Reviewers: gracjan, nomeata, austin, bgamari, simonmar, hvr
      
      Reviewed By: hvr
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2728
      
      GHC Trac Issues: #12851
      3ec85630
    • Rufflewind's avatar
      Detect color support · 52222f9b
      Rufflewind authored
      Test Plan: validate
      
      Reviewers: erikd, Phyx, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2717
      
      GHC Trac Issues: #8809
      52222f9b
    • Rufflewind's avatar
      Make diagnostics slightly more colorful · f1fc8cbf
      Rufflewind authored
      This is a preliminary commit to add colors to diagnostics (warning and
      error messages).  The aesthetic changes are:
      
        - 'warning', 'error', and 'fatal' are all colored magenta, red, and
          red respectively.
        - The warning annotation [-Wsomething] shares the same color.
        - Warnings and errors are also bolded (this is consistent with what
          other compilers do).
      
      A new flag has been added to control the behavior:
      
          -fdiagnostics-color=(always|auto|never)
      
      This flag is 'auto' by default.  However, auto-detection is not
      implemented yet, so it effectively it defaults to off.
      
      Test Plan: validate
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2716
      
      GHC Trac Issues: #8809
      f1fc8cbf
  12. 21 Nov, 2016 1 commit
    • Maciej Bielecki's avatar
      Implement fine-grained `-Werror=...` facility · 514acfe4
      Maciej Bielecki authored
      This patch add new options `-Werror=...`, `-Wwarn=...` and
      `-Wno-error=...` (synonym for `-Wwarn=...`).
      
      Semantics:
      
        - `-Werror` marks all warnings as fatal, including those that don't
          have a warning flag, and CPP warnings.
        - `-Werror=...` enables a warning and marks it as fatal
        - `-Wwarn=...` marks a warning as non-fatal, but doesn't disable it
      
      Test Plan: validate
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: mpickering, svenpanne, RyanGlScott, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2706
      
      GHC Trac Issues: #11219
      514acfe4
  13. 12 Nov, 2016 1 commit
  14. 11 Nov, 2016 1 commit
    • Ben Gamari's avatar
      Pass -no-pie to GCC · d421a7e2
      Ben Gamari authored
      Certain distributions (e.g. Debian and Ubuntu) have enabled PIE be
      default in their GCC packaging. This breaks our abuse of GCC as a linker
      which requires that we pass -Wl,-r, which is incompatible with
      PIE (since the former implies that we are generating a relocatable
      object file and the latter an executable).
      
      This is a second attempt at D2691. This attempt constrasts with D2691 in that
      it preserves the "does gcc support -no-pie" flag in settings, allowing this to
      be reconfigured by `configure` during installation of a binary distribution.
      Thanks for @rwbarton for drawing attention to this issue.
      
      Test Plan: Validate
      
      Reviewers: austin, hvr, erikd
      
      Reviewed By: erikd
      
      Subscribers: thomie, rwbarton, erikd
      
      Differential Revision: https://phabricator.haskell.org/D2693
      
      GHC Trac Issues: #12759
      d421a7e2
  15. 06 Nov, 2016 1 commit
  16. 26 Oct, 2016 1 commit
    • Matthew Pickering's avatar
      Remove -dtrace-level · 48876ae0
      Matthew Pickering authored
      The flag was:
      
      1. Not documented.
      2. Only used as a boolean flag.
      3. Has overlapping functionality with -dno-debug-output
      4. My poll of #ghc concluded that people didn't know it existed.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2627
      
      GHC Trac Issues: #12691
      48876ae0
  17. 22 Oct, 2016 1 commit
    • Erik de Castro Lopo's avatar
      Add -Wcpp-undef warning flag · 3cb32d8b
      Erik de Castro Lopo authored
      When enabled, this new warning flag passes `-Wundef` to the C
      pre-processor which causes the pre-processor to warn on uses of
      the `#if` directive on undefined identifiers.
      
      It is not currently enabled in any of the standard warning groups.
      
      Test Plan: Make sure the two tests pass on all major platforms.
      
      Reviewers: hvr, carter, Phyx, bgamari, austin
      
      Reviewed By: Phyx
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2626
      
      GHC Trac Issues: #12752
      3cb32d8b
  18. 08 Oct, 2016 3 commits
  19. 07 Oct, 2016 2 commits
  20. 02 Oct, 2016 1 commit
  21. 01 Oct, 2016 2 commits
    • tmcgilchrist's avatar
      Recognise US spelling for specialisation flags. · 151edd89
      tmcgilchrist authored
      The user guide says that we allow the user to use `specialise` or
      `specialize` interchangeably but this wasn't the case for the relevant
      flags. This patch adds aliases for the flags which control
      specialisation.
      
      Reviewers: erikd, austin, mpickering, bgamari
      
      Reviewed By: mpickering, bgamari
      
      Subscribers: mpickering, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2542
      
      GHC Trac Issues: #12575
      151edd89
    • Ryan Scott's avatar
      Implement deriving strategies · 9e862765
      Ryan Scott authored
      Allows users to explicitly request which approach to `deriving` to use
      via keywords, e.g.,
      
      ```
      newtype Foo = Foo Bar
        deriving Eq
        deriving stock    Ord
        deriving newtype Show
      ```
      
      Fixes #10598. Updates haddock submodule.
      
      Test Plan: ./validate
      
      Reviewers: hvr, kosmikus, goldfire, alanz, bgamari, simonpj, austin,
      erikd, simonmar
      
      Reviewed By: alanz, bgamari, simonpj
      
      Subscribers: thomie, mpickering, oerjan
      
      Differential Revision: https://phabricator.haskell.org/D2280
      
      GHC Trac Issues: #10598
      9e862765
  22. 16 Sep, 2016 1 commit
    • Ben Gamari's avatar
      Remove directories from include paths · ea310f99
      Ben Gamari authored
      Previously this was a relative path which worked in the GHC tree, but
      failed elsewhere. This caused trouble for out-of-tree users as well as
      Hadrian, which wants to move build artifacts out of the working
      directory. Fixes #8040.
      
      Test Plan: Validate
      
      Reviewers: thomie, austin, snowleopard, hvr
      
      Reviewed By: snowleopard, hvr
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2530
      
      GHC Trac Issues: #8040
      ea310f99
  23. 10 Sep, 2016 1 commit
    • Ryan Scott's avatar
      Remove -flocal-ghci-history from default flags · 7b4bb405
      Ryan Scott authored
      Summary:
      D2461 seemed to (inadvertently, I think) add the
      `-flocal-ghci-history` flag to the list of `defaultFlags` that are enabled
      automatically. As a result, every invocation of `ghci` caused a local GHCi
      history to be saved to the current directory, which probably shouldn't be the
      default.
      
      Test Plan:
      Run `ghci`, observe the lack of a `.ghci_history` file in your
      working directory
      
      Reviewers: austin, thomie, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: ak3n
      
      Differential Revision: https://phabricator.haskell.org/D2520
      
      GHC Trac Issues: #9089
      7b4bb405
  24. 31 Aug, 2016 3 commits
  25. 30 Aug, 2016 1 commit
    • Duncan Coutts's avatar
      Fix handling of package-db entries in .ghc.environment files, etc. · ef784c55
      Duncan Coutts authored
      Previously interpreting the content of the .ghc.env files was done
      after the step that loaded the available package dbs. This meant that
      setting the package db flags was ineffective. This patch moves
      interpreting the env files before loading of the package dbs.
      
      Also, the package-db entries refer to files. Allow spaces in these file
      names. Also treat as comments lines beginning with "--".
      
      These are pretty minor fixes in a feature that up 'til now has been
      essentially unused (witness no bug report about it), so there's very
      low risk here. If we can get this into 8.0.2 then cabal can start
      generating the .ghc.environment files, otherwise it cannot as it needs
      the working package-db entries, to be able to refer to local package
      dbs in the build tree (or cabal nix store).
      
      Test Plan:
      Manually create example .ghc.env files
      run ghci; :show packages
      Done this. It works.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2476
      ef784c55
  26. 05 Aug, 2016 1 commit
  27. 21 Jul, 2016 1 commit
    • Ömer Sinan Ağacan's avatar
      Implement unboxed sum primitive type · 714bebff
      Ömer Sinan Ağacan authored
      Summary:
      This patch implements primitive unboxed sum types, as described in
      https://ghc.haskell.org/trac/ghc/wiki/UnpackedSumTypes.
      
      Main changes are:
      
      - Add new syntax for unboxed sums types, terms and patterns. Hidden
        behind `-XUnboxedSums`.
      
      - Add unlifted unboxed sum type constructors and data constructors,
        extend type and pattern checkers and desugarer.
      
      - Add new RuntimeRep for unboxed sums.
      
      - Extend unarise pass to translate unboxed sums to unboxed tuples right
        before code generation.
      
      - Add `StgRubbishArg` to `StgArg`, and a new type `CmmArg` for better
        code generation when sum values are involved.
      
      - Add user manual section for unboxed sums.
      
      Some other changes:
      
      - Generalize `UbxTupleRep` to `MultiRep` and `UbxTupAlt` to
        `MultiValAlt` to be able to use those with both sums and tuples.
      
      - Don't use `tyConPrimRep` in `isVoidTy`: `tyConPrimRep` is really
        wrong, given an `Any` `TyCon`, there's no way to tell what its kind
        is, but `kindPrimRep` and in turn `tyConPrimRep` returns `PtrRep`.
      
      - Fix some bugs on the way: #12375.
      
      Not included in this patch:
      
      - Update Haddock for new the new unboxed sum syntax.
      
      - `TemplateHaskell` support is left as future work.
      
      For reviewers:
      
      - Front-end code is mostly trivial and adapted from unboxed tuple code
        for type checking, pattern checking, renaming, desugaring etc.
      
      - Main translation routines are in `RepType` and `UnariseStg`.
        Documentation in `UnariseStg` should be enough for understanding
        what's going on.
      
      Credits:
      
      - Johan Tibell wrote the initial front-end and interface file
        extensions.
      
      - Simon Peyton Jones reviewed this patch many times, wrote some code,
        and helped with debugging.
      
      Reviewers: bgamari, alanz, goldfire, RyanGlScott, simonpj, austin,
                 simonmar, hvr, erikd
      
      Reviewed By: simonpj
      
      Subscribers: Iceland_jack, ggreif, ezyang, RyanGlScott, goldfire,
                   thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D2259
      714bebff