1. 07 Aug, 2019 1 commit
  2. 28 Jul, 2019 1 commit
  3. 13 Jul, 2019 1 commit
  4. 18 Jun, 2019 2 commits
  5. 14 Jun, 2019 1 commit
    • Andrew Martin's avatar
      Implement the -XUnliftedNewtypes extension. · effdd948
      Andrew Martin authored
      GHC Proposal: 0013-unlifted-newtypes.rst
      Discussion: https://github.com/ghc-proposals/ghc-proposals/pull/98
      Issues: #15219, #1311, #13595, #15883
      Implementation Details:
        Note [Implementation of UnliftedNewtypes]
        Note [Unifying data family kinds]
        Note [Compulsory newtype unfolding]
      
      This patch introduces the -XUnliftedNewtypes extension. When this
      extension is enabled, GHC drops the restriction that the field in
      a newtype must be of kind (TYPE 'LiftedRep). This allows types
      like Int# and ByteArray# to be used in a newtype. Additionally,
      coerce is made levity-polymorphic so that it can be used with
      newtypes over unlifted types.
      
      The bulk of the changes are in TcTyClsDecls.hs. With -XUnliftedNewtypes,
      getInitialKind is more liberal, introducing a unification variable to
      return the kind (TYPE r0) rather than just returning (TYPE 'LiftedRep).
      When kind-checking a data constructor with kcConDecl, we attempt to
      unify the kind of a newtype with the kind of its field's type. When
      typechecking a data declaration with tcTyClDecl, we again perform a
      unification. See the implementation note for more on this.
      Co-authored-by: Richard Eisenberg's avatarRichard Eisenberg <rae@richarde.dev>
      effdd948
  6. 07 Jun, 2019 1 commit
  7. 08 May, 2019 1 commit
  8. 25 Mar, 2019 1 commit
  9. 08 Feb, 2019 1 commit
  10. 23 Jan, 2019 1 commit
    • Alec Theriault's avatar
      Error out of invalid Int/Word bit shifts · 5341edf3
      Alec Theriault authored
      Although the Haddock's for `shiftL` and `shiftR` do require the number
      of bits to be non-negative, we should still check this before calling
      out to primitives (which also have undefined behaviour for negative bit
      shifts).
      
      If a user _really_ wants to bypass checks that the number of bits is
      sensible, they already have the aptly-named `unsafeShiftL`/`unsafeShiftR`
      at their disposal.
      
      See #16111.
      5341edf3
  11. 06 Jan, 2019 1 commit
  12. 15 Oct, 2018 2 commits
  13. 05 Oct, 2018 1 commit
    • David Feuer's avatar
      Stable name type role · 22872574
      David Feuer authored
      Make the `StableName#` parameter phantom:
      
      There is actually never any reason to care about the type of
      the underlying object of a `StableName#`. The underlying object
      type shouldn't really even *be* a parameter. But at least we
      can mark it as phantom.
      
      Reviewers: hvr, bgamari, erikd, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: ekmett, rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5117
      22872574
  14. 24 Aug, 2018 1 commit
  15. 20 Jun, 2018 1 commit
  16. 17 Jun, 2018 1 commit
  17. 14 Jun, 2018 1 commit
  18. 02 Jun, 2018 1 commit
  19. 27 May, 2018 1 commit
  20. 19 May, 2018 1 commit
  21. 13 May, 2018 2 commits
  22. 06 May, 2018 1 commit
  23. 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
  24. 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
  25. 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
  26. 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
  27. 18 Feb, 2018 1 commit
  28. 13 Feb, 2018 1 commit
  29. 03 Feb, 2018 1 commit
  30. 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
  31. 07 Dec, 2017 1 commit
  32. 28 Nov, 2017 1 commit
  33. 27 Nov, 2017 1 commit
  34. 02 Nov, 2017 1 commit
  35. 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