1. 30 Jun, 2014 1 commit
    • Iavor S. Diatchki's avatar
      Overlapable pragmas for individual instances (#9242) · 6290eead
      Iavor S. Diatchki authored
      Programmers may provide a pragma immediately after the `instance` keyword
      to control the overlap/incoherence behavior for individual instances.
      For example:
      
          instance {-# OVERLAP #-} C a where ...
      
      I chose this notation, rather than the other two outlined in the ticket
      for these reasons:
      
         1. Having the pragma after the type looks odd, I think.
         2. Having the pragma after there `where` does not work for
             stand-alone derived instances
      
      I have implemented 3 pragams:
      
         1. NO_OVERLAP
         2. OVERLAP
         3. INCOHERENT
      
      These correspond directly to the internal modes currently supported by
      GHC.  If a pragma is specified, it will be used no matter what flags are
      turned on.   For example, putting `NO_OVERLAP` on an instance will mark
      it as non-overlapping, even if `OVERLAPPIN_INSTANCES` is turned on for the
      module.
      6290eead
  2. 29 Jun, 2014 7 commits
  3. 28 Jun, 2014 5 commits
  4. 27 Jun, 2014 8 commits
  5. 26 Jun, 2014 11 commits
  6. 25 Jun, 2014 6 commits
  7. 24 Jun, 2014 2 commits
    • Herbert Valerio Riedel's avatar
      Fixup c1035d51 to behave more like in GHC 7.6 · ec550e8f
      Herbert Valerio Riedel authored
      The fix in c1035d51 (addressing #9231
      
      ) was done under the assumption
      that `Data.Fixed` is used only with power-of-10 `resolution`. This
      follow-up fixup changes the behavior to be more consistent with the
      previous behavior in GHC 7.6
      
      For instance, for the following `B7` resolution
      
         > data B7
         > instance HasResolution B7 where resolution _ = 128
      
      After this patch, the following behavior is now observable:
      
         > 1.070 :: Fixed B7
         1.062
         > 1.062 :: Fixed B7
         1.054
      
         > read "1.070" :: Fixed B7
         1.062
         > read "1.062" :: Fixed B7
         1.054
      
      This doesn't provide the desirable "read . show == id" property
      yet (which didn't hold in GHC 7.6 either), but at least `fromRational`
      and `read` are consistent.
      Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
      ec550e8f
    • tibbe's avatar
      Add more primops for atomic ops on byte arrays · d8abf85f
      tibbe authored
      Summary:
      Add more primops for atomic ops on byte arrays
      
      Adds the following primops:
      
       * atomicReadIntArray#
       * atomicWriteIntArray#
       * fetchSubIntArray#
       * fetchOrIntArray#
       * fetchXorIntArray#
       * fetchAndIntArray#
      
      Makes these pre-existing out-of-line primops inline:
      
       * fetchAddIntArray#
       * casIntArray#
      d8abf85f