1. 06 May, 2018 1 commit
  2. 03 May, 2018 1 commit
    • Chaitanya Koparkar's avatar
      Move the ResponseFile module from haddock into base · 866525a1
      Chaitanya Koparkar authored
      GHC and the build tools use "response files" to work around the limit
      on the length of command line arguments on Windows. Haddock's
      implementation of parsing response files (i.e escaping/unescaping the
      appropriate characters) seems complete, is well tested, and also
      closely matches the GCC version. This patch moves the relevant bits
      into `base` so that it's easier for other libraries to reuse it.
      
      Test Plan: make test TEST=T13896
      
      Reviewers: bgamari, RyanGlScott, 23Skidoo, hvr
      
      Reviewed By: RyanGlScott
      
      Subscribers: thomie, carter
      
      GHC Trac Issues: #13896
      
      Differential Revision: https://phabricator.haskell.org/D4612
      866525a1
  3. 13 Apr, 2018 2 commits
    • Ryan Scott's avatar
      Correct FixIOException's @since annotation retroactively · ce27c7d5
      Ryan Scott authored
      Summary:
      In D4113, a `FixIOException` data type was added with a
      `@since TODO` annotation, but it seems that `TODO` made it out into
      `base-4.11` itself. I've (retroactively) fixed this and added an
      entry to the `base-4.11` entry in the `changelog`.
      
      Test Plan: Read it
      
      Reviewers: dfeuer, hvr, bgamari
      
      Reviewed By: dfeuer
      
      Subscribers: thomie, carter
      
      GHC Trac Issues: #14356, #15025
      
      Differential Revision: https://phabricator.haskell.org/D4578
      ce27c7d5
    • Ryan Scott's avatar
      Bump version numbers: base-4.11.1.0, integer-gmp-1.0.2.0 · c4814ab6
      Ryan Scott authored
      This takes care of bumping the `base` and `integer-gmp`
      minor version numbers in anticipation of a GHC 8.4.2 release.
      
      While I was in town, I also filled in a `@since TODO` Haddock
      annotation for `powModSecInteger` in `integer-gmp` with
      `1.0.2.0`, and updated the changelog accordingly.
      
      Test Plan: ./validate
      
      Reviewers: hvr, goldfire, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie, carter
      
      GHC Trac Issues: #15025
      
      Differential Revision: https://phabricator.haskell.org/D4586
      c4814ab6
  4. 23 Mar, 2018 1 commit
    • Ryan Scott's avatar
      Special-case record fields ending with hash when deriving Read · d5577f44
      Ryan Scott authored
      Summary:
      In commit dbd81f7e, a
      regression was inadvertently introduced which caused derived `Read`
      instances for record data types with fields ending in a `#` symbol
      (using `MagicHash`) would no longer parse on valid output. This
      is ultimately due to the same reasons as #5041, as we cannot parse
      a field name like `foo#` as a single identifier. We fix this issue
      by employing the same workaround as in #5041: first parse the
      identifier name `foo`, then then symbol `#`.
      
      This is accomplished by the new `readFieldHash` function in
      `GHC.Read`. This will likely warrant a `base-4.11.1.0` release.
      
      Test Plan: make test TEST=T14918
      
      Reviewers: tdammers, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #14918
      
      Differential Revision: https://phabricator.haskell.org/D4502
      d5577f44
  5. 02 Mar, 2018 2 commits
    • Xia Li-yao's avatar
      Add Applicative, Semigroup, and Monoid instances in GHC.Generics · 7782b47c
      Xia Li-yao authored
      Reviewers: hvr, bgamari, alpmestan, RyanGlScott
      
      Reviewed By: RyanGlScott
      
      Subscribers: RyanGlScott, rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4447
      7782b47c
    • Andrew Martin's avatar
      Move Data.Functor.Contravariant from the contravariant package to base. · 8c7a1551
      Andrew Martin authored
      Move Data.Functor.Contravariant from the contravariant package to base.
      Since base is the bottom of the dependency hierarchy, several instances
      have been removed. They will need to be added to the following packages:
      transformers, StateVar, and possibly tagged. There may not actually have
      been any types from tagged that previous had instanced provided by this
      module though, since it may have only been used for Data.Proxy. Additionally,
      all CPP has been removed. Derived Typeable instances have been removed
      (since Typeable is now automatically derived for everything). The language
      extension Safe is still used, although it is unclear to ATM whether or not
      it is necessary.
      
      This resolves trac issue #14767.
      
      Test Plan: validate
      
      Reviewers: RyanGlScott, ekmett, hvr, bgamari
      
      Reviewed By: RyanGlScott
      
      Subscribers: rwbarton, thomie, ekmett, carter, RyanGlScott
      
      GHC Trac Issues: #14767
      
      Differential Revision: https://phabricator.haskell.org/D4399
      8c7a1551
  6. 18 Feb, 2018 1 commit
  7. 13 Feb, 2018 1 commit
  8. 03 Feb, 2018 1 commit
  9. 02 Jan, 2018 1 commit
    • Tamar Christina's avatar
      Make System.IO.openTempFile thread-safe on Windows · 46287af0
      Tamar Christina authored
      This calls out to the Win32 API `GetTempFileName` to generate
      a temporary file. Using `uUnique = 0` guarantees that the file
      we get back is unique and the file is "reserved" by creating it.
      
      Test Plan:
      ./validate
      
      I can't think of any sensible tests that shouldn't run for a while
      to verify. So the example in #10731 was ran for a while and no
      collisions in new code
      
      Reviewers: hvr, bgamari, erikd
      
      Reviewed By: bgamari
      
      Subscribers: RyanGlScott, rwbarton, thomie, carter
      
      GHC Trac Issues: #10731
      
      Differential Revision: https://phabricator.haskell.org/D4278
      46287af0
  10. 07 Dec, 2017 1 commit
  11. 28 Nov, 2017 1 commit
  12. 27 Nov, 2017 1 commit
  13. 02 Nov, 2017 1 commit
  14. 22 Oct, 2017 1 commit
    • Tamar Christina's avatar
      Add stack traces on crashes on Windows · 99c61e22
      Tamar Christina authored
      Summary:
      This patch adds the ability to generate stack traces on crashes for Windows.
      When running in the interpreter this attempts to use symbol information from
      the interpreter and information we know about the loaded object files to
      resolve addresses to symbols.
      
      When running compiled it doesn't have this information and then defaults
      to using symbol information from PDB files. Which for now means only
      files compiled with ICC or MSVC will show traces compiled.
      
      But I have a future patch that may address this shortcoming.
      
      Also since I don't know how to walk a pure haskell stack, I can for now
      only show the last entry. I'm hoping to figure out how Apply.cmm works to
      be able to walk the stalk and give more entries for pure haskell code.
      
      In GHCi
      
      ```
      $ echo main | inplace/bin/ghc-stage2.exe --interactive ./testsuite/tests/rts/derefnull.hs
      GHCi, version 8.3.20170830: http://www.haskell.org/ghc/  :? for help
      Ok, 1 module loaded.
      Prelude Main>
      Access violation in generated code when reading 0x0
      
       Attempting to reconstruct a stack trace...
      
         Frame        Code address
       * 0x77cde10    0xc370229 E:\..\base\dist-install\build\HSbase-4.10.0.0.o+0x190031
                       (base_ForeignziStorable_zdfStorableInt4_info+0x3f)
      ```
      
      and compiled
      
      ```
      Access violation in generated code when reading 0x0
      
       Attempting to reconstruct a stack trace...
      
         Frame        Code address
       * 0xf0dbd0     0x40bb01 E:\..\rts\derefnull.run\derefnull.exe+0xbb01
      ```
      
      Test Plan: ./validate
      
      Reviewers: austin, hvr, bgamari, erikd, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3913
      99c61e22
  15. 12 Oct, 2017 1 commit
    • Simon Peyton Jones's avatar
      Re-apply "Typeable: Allow App to match arrow types" · 3de788c4
      Simon Peyton Jones authored
      This re-applies
       commit cc6be3a2
        Author: Ben Gamari <bgamari.foss@gmail.com>
        Date:   Tue Sep 19 18:57:38 2017 -0400
      
          Typeable: Allow App to match arrow types
      
      which was reverted because of Trac #14270.  Now the latter is
      fixed we can re-apply it.
      
      The original ticket was Trac #14236
      3de788c4
  16. 03 Oct, 2017 4 commits
    • Ben Gamari's avatar
      base: Remove deprecated Chan combinators · 361af628
      Ben Gamari authored
      Removes isEmptyChan and unGetChan, which have been deprecated for a very
      long time. See #13561.
      
      Test Plan: Validate
      
      Reviewers: austin, hvr
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #13561
      
      Differential Revision: https://phabricator.haskell.org/D4060
      361af628
    • Iavor S. Diatchki's avatar
      Implement Div, Mod, and Log for type-level nats. · fa8035e3
      Iavor S. Diatchki authored
      Reviewers: austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: RyanGlScott, dfeuer, adamgundry, rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D4002
      fa8035e3
    • Tamar Christina's avatar
      Add ability to produce crash dumps on Windows · ec9ac20d
      Tamar Christina authored
      It's often hard to debug things like segfaults on Windows,
      mostly because gdb isn't always of use and users don't know
      how to effectively use it.
      
      This patch provides a way to create a crash drump by passing
      
      `+RTS --generate-crash-dumps` as an option. If any unhandled
      exception is triggered a dump is made that contains enough
      information to be able to diagnose things successfully.
      
      Currently the created dumps are a bit big because I include
      all registers, code and threads information.
      
      This looks like
      
      ```
      $ testsuite/tests/rts/derefnull.run/derefnull.exe +RTS
      --generate-crash-dumps
      
      Access violation in generated code when reading 0000000000000000
      Crash dump created. Dump written to:
              E:\msys64\tmp\ghc-20170901-220250-11216-16628.dmp
      ```
      
      Test Plan: ./validate
      
      Reviewers: austin, hvr, bgamari, erikd, simonmar
      
      Reviewed By: bgamari, simonmar
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3912
      ec9ac20d
    • Herbert Valerio Riedel's avatar
      Sync base/changelog.md · 55001c0c
      Herbert Valerio Riedel authored
      This updates the base-4.10.0.0 entry heading which has diverged from
      
       http://hackage.haskell.org/package/base-4.10.0.0/src/changelog.md
      
      and while at it also sets the GHC version for the base-4.11 entry to
      avoid confusion about what GHC 8.2.2's base is going to include.
      
      [skip ci]
      55001c0c
  17. 26 Sep, 2017 3 commits
    • Tamar Christina's avatar
      Switch VEH to VCH and allow disabling of SEH completely. · 1421d87c
      Tamar Christina authored
      Exception handling on Windows is unfortunately a bit complicated.
      But essentially the VEH Handlers we currently have are running too
      early.
      
      This was a problem as it ran so early it also swallowed C++ exceptions
      and other software exceptions which the system could have very well
      recovered from.
      
      So instead we use a sequence of chains to for the exception handlers to
      run as late as possible. You really can't get any later than this.
      
      Please read the comment in the patch for more details.
      
      I'm also providing a switch to allow people to turn off the exception
      handling entirely. In case it does present a problem with their code.
      
      (Reverted and recommitted to fix authorship information)
      
      Test Plan: ./validate
      
      Reviewers: austin, hvr, bgamari, erikd, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #13911, #12110
      
      Differential Revision: https://phabricator.haskell.org/D3911
      1421d87c
    • Ben Gamari's avatar
      Revert "Switch VEH to VCH and allow disabling of SEH completely." · 47888fd8
      Ben Gamari authored
      Reverting to fix authorship of commit.
      
      This reverts commit 1825cbdb.
      47888fd8
    • Ben Gamari's avatar
      Switch VEH to VCH and allow disabling of SEH completely. · 1825cbdb
      Ben Gamari authored
      Exception handling on Windows is unfortunately a bit complicated.
      But essentially the VEH Handlers we currently have are running too
      early.
      
      This was a problem as it ran so early it also swallowed C++ exceptions
      and other software exceptions which the system could have very well
      recovered from.
      
      So instead we use a sequence of chains to for the exception handlers to
      run as late as possible. You really can't get any later than this.
      
      Please read the comment in the patch for more details.
      
      I'm also providing a switch to allow people to turn off the exception
      handling entirely. In case it does present a problem with their code.
      
      Test Plan: ./validate
      
      Reviewers: austin, hvr, bgamari, erikd, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #13911, #12110
      
      Differential Revision: https://phabricator.haskell.org/D3911
      1825cbdb
  18. 24 Sep, 2017 1 commit
  19. 21 Sep, 2017 3 commits
  20. 19 Sep, 2017 2 commits
  21. 17 Sep, 2017 1 commit
  22. 13 Sep, 2017 2 commits
    • David Feuer's avatar
      Simplify Data.Type.Equality.== · 4be195e7
      David Feuer authored
      Contrary to previous comments, we can calculate `==` for types
      in an extremely general fashion. The approach used here is actually
      the one mistakenly rejected as impossible. There will be some cases
      when the previous version was able to reduce and this one is not,
      particularly for types in `*` that are unknown, but known equal.
      However, the new behavior is much more uniform. Within the
      established framework of equality testing by pattern matching,
      it does a better job than the previous version.
      
      Reviewers: goldfire, austin, hvr, bgamari, RyanGlScott
      
      Reviewed By: RyanGlScott
      
      Subscribers: RyanGlScott, rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3835
      4be195e7
    • Tao He's avatar
      Make IntPtr and WordPtr as instance of Data.Data typeclass, fix #13115 · cbd49117
      Tao He authored
      Test Plan: ./validate
      
      Reviewers: austin, hvr, bgamari, RyanGlScott
      
      Reviewed By: RyanGlScott
      
      Subscribers: RyanGlScott, rwbarton, thomie
      
      GHC Trac Issues: #13115
      
      Differential Revision: https://phabricator.haskell.org/D3938
      cbd49117
  23. 07 Sep, 2017 1 commit
    • Herbert Valerio Riedel's avatar
      Make Semigroup a superclass of Monoid (re #14191) · 8ae263ce
      Herbert Valerio Riedel authored
      Unfortunately, this requires introducing a couple of .hs-boot files to
      break up import cycles (mostly to provide class & typenames in order to
      be able to write type signatures).
      
      This does not yet re-export `(<>)` from Prelude (while the class-name
      `Semigroup` is reexported); that will happen in a future commit.
      
      Test Plan: local ./validate passed
      
      Reviewers: ekmett, austin, bgamari, erikd, RyanGlScott
      
      Reviewed By: ekmett, RyanGlScott
      
      GHC Trac Issues: #14191
      
      Differential Revision: https://phabricator.haskell.org/D3927
      8ae263ce
  24. 25 Aug, 2017 1 commit
  25. 22 Aug, 2017 1 commit
    • Ryan Scott's avatar
      Make the Read instance for Proxy (and friends) ignore precedence · 8fd95999
      Ryan Scott authored
      Summary:
      The `Read` instance for `Proxy`, as well as a handful of other data
      types in `base` which only have a single constructor, are doing something
      skeevy: they're requiring that they be surrounded by parentheses if the parsing
      precedence is sufficiently high. This means that `"Thing (Proxy)"` would parse,
      but not `"Thing Proxy"`. But the latter really ought to parse, since there's no
      need to surround a single constructor with parentheses. Indeed, that's the
      output of `show (Thing Proxy)`, so the current `Read` instance for `Proxy`
      violates `read . show = id`.
      
      The simple solution is to change `readParen (d > 10)` to `readParen False` in
      the `Read` instance for `Proxy`. But given that a derived `Read` instance would
      essentially accomplish the same thing, but with even fewer characters, I've
      opted to just replace the hand-rolled `Read` instance with a derived one.
      
      Test Plan: make test TEST=T12874
      
      Reviewers: ekmett, austin, hvr, goldfire, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #12874
      
      Differential Revision: https://phabricator.haskell.org/D3871
      8fd95999
  26. 19 Aug, 2017 2 commits
  27. 15 Aug, 2017 1 commit
  28. 05 Aug, 2017 1 commit
    • Ryan Scott's avatar
      Remove the deprecated Typeable{1..7} type synonyms · a81b5b00
      Ryan Scott authored
      Summary:
      `Typeable{1..7}` (type synonyms for the poly-kinded `Typeable`) have
      been deprecated since GHC 7.8. They're now causing problems for users who try
      to still work with them in legacy code, since they can no longer be used in
      instances. To avoid this sort of confusion, let's just remove `Typeable{1..7}`
      altogether. Resolves #14047.
      
      Reviewers: bgamari, austin, hvr
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #14047
      
      Differential Revision: https://phabricator.haskell.org/D3817
      a81b5b00