This project is mirrored from https://gitlab.haskell.org/ghc/ghc.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
  1. 07 Mar, 2015 3 commits
  2. 04 Mar, 2015 1 commit
    • Simon Peyton Jones's avatar
      A raft of small changes associated with -XConstrainedClassMethods · f66e0e69
      Simon Peyton Jones authored
      See Trac #7854.  Specifically:
      
      * Major clean up and simplification of check_op in checkValidClass;
        specifically
           - use checkValidType on the entire method-selector type to detect
             ambiguity
           - put a specific test for -XConstrainedClassMethods
      
      * Make -XConstrainedClassMethods be implied by -XMultiParamTypeClasses
        (a bit ad-hoc but see #7854), and document in the user manual.
      
      * Do the checkAmbiguity test just once in TcValidity.checkValidType,
        rather than repeatedly at every level. See Note [When to call checkAmbiguity]
      
      * Add -XAllowAmbiguousTypes in GHC.IP, since 'ip' really is ambiguous.
        (It's a rather magic function.)
      
      * Improve location info for check_op in checkValidClass
      
      * Update quite a few tests, which had genuinely-ambiguous class
        method signatures.  Some I fixed by making them unambiguous; some
        by adding -XAllowAmbiguousTypes
      f66e0e69
  3. 02 Mar, 2015 1 commit
  4. 26 Feb, 2015 1 commit
  5. 23 Feb, 2015 1 commit
  6. 17 Feb, 2015 1 commit
  7. 10 Feb, 2015 1 commit
  8. 09 Feb, 2015 1 commit
    • Herbert Valerio Riedel's avatar
      Provide default implementation of `Monad(return)` · a741e69a
      Herbert Valerio Riedel authored
      This was dropped last-minute from d94de872
      (re #4834) together with the default implementation for `(>>)`
      (see 65f887e1 for explanation).
      
      However, the risk of accidental mutually recursive definitions of
      `return`/`pure` is rather low as unlike with the `(>>) = (*>)` default,
      any cyclic definitions would necessarily wind up being new ones, rather
      than changing the semantics for old operations and introducing bottoms.
      
      On the other hand, not having the default method implementation in place
      in GHC 7.10 would complicate/delay any future attempt to clean-up the
      `Monad`-class.
      
      This finally allows (for `base >= 4.8`) to define a F/A/M instance-chain
      with the following minimal definitions (while ignoring that `return` is
      still a class-method in `Monad`)
      
        instance Functor M where
          fmap  = ...
      
        instance Applicative M where
          pure  = ...
          (<*>) = ...
      
        instance Monad M where
          (>>=) = ...
      
      Reviewed By: ekmett, austin
      
      Differential Revision: https://phabricator.haskell.org/D647
      a741e69a
  9. 06 Feb, 2015 1 commit
  10. 05 Feb, 2015 1 commit
  11. 02 Feb, 2015 1 commit
    • AndreasVoellmy's avatar
      Fix #10017 · 92c93544
      AndreasVoellmy authored
      Summary:
      In the threaded RTS, a signal is delivered from the RTS to Haskell
      user code by writing to file that one of the IO managers watches (via
      an instance of GHC.Event.Control.Control). When the IO manager
      receives the signal, it calls GHC.Conc.Signal.runHandlers to invoke
      Haskell signal handler. In the move from a single IO manager to one IO
      manager per capability, the behavior was (wrongly) extended so that a
      signal is delivered to every event manager (see #9423), each of which
      invoke Haskell signal handlers, leading to multiple invocations of
      Haskell signal handlers for a single signal. This change fixes this
      problem by having the RTS (in generic_handler()) notify only the
      Control instance used by the TimerManager, rather than all the
      per-capability IO managers.
      
      Reviewers: austin, hvr, simonmar, Mikolaj
      
      Reviewed By: simonmar, Mikolaj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D641
      92c93544
  12. 23 Jan, 2015 1 commit
  13. 19 Jan, 2015 3 commits
    • Eric Seidel's avatar
      Expose source locations via Implicit Parameters of type GHC.Location.Location · c024af13
      Eric Seidel authored
      Summary:
      IPs with this type will always be solved for the current source
      location. If another IP of the same type is in scope, the two locations will be
      appended, creating a call-stack. The Location type is kept abstract so users
      cannot create them, but a Location can be turned into a list of SrcLocs, which
      correspond to individual locations in a program. Each SrcLoc contains a
      package/module/file name and start/end lines and columns.
      
      The only thing missing from the SrcLoc in my opinion is the name of the
      top-level definition it inhabits. I suspect that would also be useful, but it's
      not clear to me how to extract the current top-level binder from within the
      constraint solver. (Surely I'm just missing something here?)
      
      I made the (perhaps controversial) decision to have GHC completely ignore
      the names of Location IPs, meaning that in the following code:
      
          bar :: (?myloc :: Location) => String
          bar = foo
      
          foo :: (?loc :: Location) => String
          foo = show ?loc
      
      if I call `bar`, the resulting call-stack will include locations for
      
      1. the use of `?loc` inside `foo`,
      2. `foo`s call-site inside `bar`, and
      3. `bar`s call-site, wherever that may be.
      
      This makes Location IPs very special indeed, and I'm happy to change it if the
      dissonance is too great.
      
      I've also left out any changes to base to make use of Location IPs, since there
      were some concerns about a snowball effect. I think it would be reasonable to
      mark this as an experimental feature for now (it is!), and defer using it in
      base until we have more experience with it. It is, after all, quite easy to
      define your own version of `error`, `undefined`, etc. that use Location IPs.
      
      Test Plan: validate, new test-case is testsuite/tests/typecheck/should_run/IPLocation.hs
      
      Reviewers: austin, hvr, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: simonmar, rodlogic, carter, thomie
      
      Differential Revision: https://phabricator.haskell.org/D578
      
      GHC Trac Issues: #9049
      c024af13
    • Austin Seipp's avatar
      Revert "Add export lists to some modules." · f006ed79
      Austin Seipp authored
      This reverts commit d6e7f5dc.
      
      This commit broke the build on Windows due to CPP weirdness (#9945).
      f006ed79
    • Austin Seipp's avatar
      Revert "Fix undefined GHC.Real export with integer-simple" · e1a45810
      Austin Seipp authored
      This reverts commit 228902aa.
      
      This commit is dependent on d6e7f5dc,
      which broke the build on Windows (issue #9945).
      e1a45810
  14. 16 Jan, 2015 1 commit
    • Alexander Vershilov's avatar
      Trac #9878: Make the static form illegal in interpreted mode. · fffbf062
      Alexander Vershilov authored
      
      
      Summary:
      The entries of the static pointers table are expected to exist as
      object code. Thus we have ghci complain with an intelligible error
      message if the static form is used in interpreted mode.
      
      It also includes a fix to keysHashTable in Hash.c which could cause a
      crash. The iteration of the hashtable internals was incorrect. This
      patch has the function keysHashTable imitate the iteration in
      freeHashTable.
      
      Finally, we submit here some minor edits to comments and
      GHC.StaticPtr.StaticPtrInfo field names.
      
      Authored-by: Alexander Vershilov <alexander.vershilov@tweag.
      Authored-by: default avatarFacundo Domínguez <facundo.dominguez@tweag.io>
      
      Test Plan: ./validate
      
      Reviewers: simonpj, hvr, austin
      
      Reviewed By: austin
      
      Subscribers: carter, thomie, qnikst, mboes
      
      Differential Revision: https://phabricator.haskell.org/D586
      
      GHC Trac Issues: #9878
      fffbf062
  15. 13 Jan, 2015 1 commit
  16. 12 Jan, 2015 1 commit
    • Ben Gamari's avatar
      Event Manager: Make one-shot a per-registration property · 02343998
      Ben Gamari authored
      Summary:
      Currently the event manager has a global flag for whether to create
      epoll-like notifications as one-shot (e.g. EPOLLONESHOT, where an fd
      will be deactivated after its first event) or standard multi-shot
      notifications.
      
      Unfortunately this means that the event manager may export either
      one-shot or multi-shot semantics to the user. Even worse, the user has
      no way of knowing which semantics are being delivered. This resulted in
      breakage in the usb[1] library which deadlocks after notifications on
      its fd are disabled after the first event is delivered.  This patch
      reworks one-shot event support to allow the user to choose whether
      one-shot or multi-shot semantics are desired on a per-registration
      basis. The event manager can then decide whether to use a one-shot or
      multi-shot epoll.
      
      A registration is now defined by a set of Events (as before) as well as
      a Lifetime (either one-shot or multi-shot). We lend monoidal structure
      to Lifetime choosing OneShot as the identity. This allows us to combine
      Lifetime/Event pairs of an fd to give the longest desired lifetime of
      the registration and the full set of Events for which we want
      notification.
      
      [1] https://github.com/basvandijk/usb/issues/7
      
      Test Plan: Add more test cases and validate
      
      Reviewers: tibbe, AndreasVoellmy, hvr, austin
      
      Reviewed By: austin
      
      Subscribers: thomie, carter, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D347
      02343998
  17. 07 Jan, 2015 1 commit
  18. 06 Jan, 2015 1 commit
  19. 29 Dec, 2014 1 commit
  20. 28 Dec, 2014 1 commit
  21. 22 Dec, 2014 1 commit
  22. 19 Dec, 2014 1 commit
  23. 16 Dec, 2014 2 commits
  24. 10 Dec, 2014 2 commits
  25. 08 Dec, 2014 1 commit
  26. 06 Dec, 2014 1 commit
  27. 02 Dec, 2014 1 commit
  28. 29 Nov, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Implement `GHC.Natural.powModNatural` (#9818) · 859680f6
      Herbert Valerio Riedel authored
      This makes use of the `powMod*` primitives provided by
      `integer-gmp-1.0.0`. This is the `Natural`-version of the related
      `GHC.Integer.GMP.Internals.powModInteger` operation.
      
      The fallback implementation uses a square and multiply algorithm,
      compared to which the optimized GMP-based implementation needs much less
      allocations due to in-place mutation during the computation.
      859680f6
  29. 26 Nov, 2014 1 commit
  30. 24 Nov, 2014 2 commits
  31. 22 Nov, 2014 3 commits