1. 07 Aug, 2019 1 commit
  2. 21 Jul, 2019 1 commit
    • Ivan Kasatenko's avatar
      Do not ignore events deletion when events to be added are provided (#16916) · 67ee741b
      Ivan Kasatenko authored
      Kqueue/kevent implementation used to ignore events to be unsubscribed
      from when events to be subscribed to were provided. This resulted in a
      lost notification subscription, when GHC runtime didn't listen for any
      events, yet the kernel considered otherwise and kept waking up the IO
      manager thread.
      This commit fixes this issue by always adding and removing all of the
      provided subscriptions.
  3. 20 Jul, 2019 1 commit
  4. 14 Jul, 2019 2 commits
    • Ruiyang Wang's avatar
    • John Ericson's avatar
      Remove purely external primops · ff04eb59
      John Ericson authored
      The compiler doesn't create uses nor compiles the uses that exist
      specially. These are just plain C-- FFI.
      These `await*` ones are especially important to so convert because "true"
      primops are hard to make platform-specific currently.
      The other exports are part of this commit so this module always exports
      something, which avoids silly CPP elsewhere. More will be added later
      once `foreign import prim` is extended.
  5. 22 Jun, 2019 1 commit
    • Ben Gamari's avatar
      ghci: Don't rely on resolution of System.IO to base module · 655c6e26
      Ben Gamari authored
      Previously we would hackily evaluate a textual code snippet to compute
      actions to disable I/O buffering and flush the stdout/stderr handles.
      This broke in a number of ways (#15336, #16563).
      Instead we now ship a module (`GHC.GHCi.Helpers`) with `base` containing
      the needed actions. We can then easily refer to these via `Orig` names.
  6. 16 Jun, 2019 1 commit
    • Ben Gamari's avatar
      base/Event/Poll: Drop POLLRDHUP enum item · db313f98
      Ben Gamari authored
      Previously the Event enumeration produced by hsc2hs would sometimes
      include a currently-unused POLLRDHUP item. This unused binding would
      result in a build failure. Drop it.
  7. 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>
  8. 09 Jun, 2019 2 commits
  9. 07 Jun, 2019 2 commits
  10. 01 Jun, 2019 1 commit
    • Nathan Collins's avatar
      Improve ThreadId Show instance · 1d43d4a3
      Nathan Collins authored
      By making it include parens when a derived instance would. For example, this changes the (hypothetical) code `show (Just (ThreadId 3))` to produce `"Just (ThreadId 3)"` instead of the current `"Just ThreadId 3"`.
  11. 31 May, 2019 1 commit
  12. 29 May, 2019 1 commit
  13. 24 May, 2019 1 commit
  14. 23 May, 2019 1 commit
  15. 10 May, 2019 1 commit
  16. 04 May, 2019 1 commit
  17. 03 May, 2019 1 commit
  18. 18 Apr, 2019 1 commit
  19. 03 Apr, 2019 2 commits
    • Chris Martin's avatar
      Inline the definition of 'ap' in the Monad laws · bf6dbe3d
      Chris Martin authored
      The law as it is currently written is meaningless, because nowhere have
      we defined the implementation of 'ap'. The reader of the Control.Monad
      documentation is provided with only a type signature,
      > ap :: Monad m => m (a -> b) -> m a -> m b
      an informal description,
      > In many situations, the liftM operations can be replaced by uses of
      > ap, which promotes function application.
      and a relationship between 'ap' and the 'liftM' functions
      > return f `ap` x1 `ap` ... `ap` xn
      > is equivalent to
      > liftMn f x1 x2 ... xn
      Without knowing how 'ap' is defined, a law involving 'ap' cannot
      provide any guidance for how to write a lawful Monad instance, nor can
      we conclude anything from the law.
      I suspect that a reader equipped with the understanding that 'ap' was
      defined prior to the invention of the Applicative class could deduce
      that 'ap' must be defined in terms of (>>=), but nowhere as far as I can
      tell have we written this down explicitly for readers without the
      benefit of historical context.
      If the law is meant to express a relationship among (<*>), (>>=), and
      'return', it seems that it is better off making this statement directly,
      sidestepping 'ap' altogether.
    • Andrew Martin's avatar
  20. 01 Apr, 2019 1 commit
  21. 25 Mar, 2019 1 commit
    • Takenobu Tani's avatar
      Update Wiki URLs to point to GitLab · 3769e3a8
      Takenobu Tani authored
      This moves all URL references to Trac Wiki to their corresponding
      GitLab counterparts.
      This substitution is classified as follows:
      1. Automated substitution using sed with Ben's mapping rule [1]
          Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...
          New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...
      2. Manual substitution for URLs containing `#` index
          Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...#Zzz
          New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...#zzz
      3. Manual substitution for strings starting with `Commentary`
          Old: Commentary/XxxYyy...
          New: commentary/xxx-yyy...
      See also !539
      [1]: https://gitlab.haskell.org/bgamari/gitlab-migration/blob/master/wiki-mapping.json
  22. 22 Mar, 2019 1 commit
  23. 15 Mar, 2019 1 commit
  24. 24 Feb, 2019 1 commit
  25. 20 Feb, 2019 1 commit
  26. 16 Feb, 2019 1 commit
  27. 15 Feb, 2019 1 commit
    • Alec Theriault's avatar
      Properly escape character literals in Haddocks · 173d0cee
      Alec Theriault authored
      Character literals in Haddock should not be written as plain `'\n'` since
      single quotes are for linking identifiers. Besides, since we want the
      character literal to be monospaced, we really should use `@\'\\n\'@`.
      [skip ci]
  28. 14 Feb, 2019 2 commits
  29. 30 Jan, 2019 4 commits
    • Zejun Wu's avatar
      Add a RTS option -xp to load PIC object anywhere in address space · e29b1ee7
      Zejun Wu authored
      This re-applies {D5195} with fixes for i386:
      * Fix unused label warnings, see {D5230} or {D5273}
      * Fix a silly bug introduced by moving `#if`
      Add a RTS option -xp to load PIC object anywhere in address space. We do
      this by relaxing the requirement of <0x80000000 result of
      `mmapForLinker` and implying USE_CONTIGUOUS_MMAP.
      We also need to change calls to `ocInit` and `ocGetNames` to avoid
      dangling pointers when the address of `oc->image` is changed by
      Test Plan:
      See {D5195}, also test under i386:
      $ uname -a
      Linux watashi-arch32 4.18.5-arch1-1.0-ARCH #1 SMP PREEMPT Tue Aug 28
      20:45:30 CEST 2018 i686 GNU/Linux
      $ cd testsuite/tests/th/ && make test
      will run `./validate` on stacked diff.
      Reviewers: simonmar, bgamari, alpmestan, trommler, hvr, erikd
      Reviewed By: simonmar
      Subscribers: rwbarton, carter
      Differential Revision: https://phabricator.haskell.org/D5289
    • Dmitry Ivanov's avatar
      Compile count{Leading,Trailing}Zeros to corresponding x86_64 instructions under -mbmi2 · c1d9416f
      Dmitry Ivanov authored
      This works similarly to existing implementation for popCount.
      Trac ticket: #16086.
    • Ben Gamari's avatar
      Revert "Batch merge" · 172a5933
      Ben Gamari authored
      This reverts commit 76c8fd67.
    • Ben Gamari's avatar
      Batch merge · 76c8fd67
      Ben Gamari authored
  30. 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
      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.
  31. 16 Jan, 2019 1 commit
    • Alec Theriault's avatar
      Remove from `base` obsolete CPP for `integer-gmp` · f7def747
      Alec Theriault authored
        * `GHC.Natural` now exports the same functions (regardless of integer backend)
        * remove unnecessary CPP around instances
        * remove the 'OPTIMISE_INTEGER_GCD_LCM' flag - almost all of those optimizations
          now work regardless of which integer backend is used
      Note that some CPP still remains for situations where there are backend-specific
      optimization hacks (like a more efficient GMP-only `gcd` for `Int#` and `Word#`).
  32. 06 Jan, 2019 1 commit