1. 15 Dec, 2021 2 commits
  2. 12 Dec, 2021 1 commit
    • Oleg Grenrus's avatar
      Use HasCallStack and error in GHC.List and .NonEmpty · 31bf380f
      Oleg Grenrus authored and Marge Bot's avatar Marge Bot committed
      In addition to providing stack traces, the scary HasCallStack will
      hopefully make people think whether they want to use these functions,
      i.e. act as a documentation hint that something weird might happen.
      
      A single metric increased, which doesn't visibly
      use any method with `HasCallStack`.
      
      -------------------------
      Metric Decrease:
          T9630
      Metric Decrease:
          T19695
          T9630
      -------------------------
      31bf380f
  3. 07 Dec, 2021 1 commit
    • sheaf's avatar
      Re-export GHC.Types from GHC.Exts · 427f9c12
      sheaf authored and Marge Bot's avatar Marge Bot committed
        Several times in the past, it has happened that things from GHC.Types
        were not re-exported from GHC.Exts, forcing users to import either
        GHC.Types or GHC.Prim, which are subject to internal change without
        notice.
      
        We now re-export GHC.Types from GHC.Exts, which should avoid this
        happening again in the future.
        In particular, we now re-export `Multiplicity` and `MultMul`,
        which we didn't before.
      
        Fixes #20695
      427f9c12
  4. 03 Dec, 2021 2 commits
  5. 26 Nov, 2021 2 commits
  6. 25 Nov, 2021 1 commit
    • sheaf's avatar
      Add Data.Bits changes to base 4.16 changelog · d530c46c
      sheaf authored and Marge Bot's avatar Marge Bot committed
        Several additions since 4.15 had not been recorded in the changelog:
      
          - newtypes And, Ior, Xor and Iff,
          - oneBits
          - symbolic synonyms `.^.`, `.>>.`, `!>>.`, `.<<.` and `!<<.`.
      
        Fixes #20608.
      d530c46c
  7. 27 Oct, 2021 1 commit
  8. 17 Sep, 2021 1 commit
  9. 11 Sep, 2021 1 commit
  10. 07 Sep, 2021 1 commit
  11. 06 Sep, 2021 1 commit
  12. 10 Aug, 2021 1 commit
  13. 05 Aug, 2021 1 commit
  14. 02 Aug, 2021 1 commit
  15. 06 Jul, 2021 1 commit
    • Fraser Tweedale's avatar
      Implement improved "get executable path" query · 4b4c5e43
      Fraser Tweedale authored and Marge Bot's avatar Marge Bot committed
      System.Environment.getExecutablePath has some problems:
      
      - Some system-specific implementations throw an exception in some
        scenarios, e.g. when the executable file has been deleted
      
      - The Linux implementation succeeds but returns an invalid FilePath
        when the file has been deleted.
      
      - The fallback implementation returns argv[0] which is not
        necessarily an absolute path, and is subject to manipulation.
      
      - The documentation does not explain any of this.
      
      Breaking the getExecutablePath API or changing its behaviour is not
      an appealing direction.  So we will provide a new API.
      
      There are two facets to the problem of querying the executable path:
      
      1. Does the platform provide a reliable way to do it?  This is
         statically known.
      
      2. If so, is there a valid answer, and what is it?  This may vary,
         even over the runtime of a single process.
      
      Accordingly, the type of the new mechanism is:
      
        Maybe (IO (Maybe FilePath))
      
      This commit implements this mechanism, defining the query action for
      FreeBSD, Linux, macOS and Windows.
      
      Fixes: #10957
      Fixes: #12377
      4b4c5e43
  16. 20 May, 2021 1 commit
  17. 27 Apr, 2021 1 commit
  18. 01 Apr, 2021 1 commit
  19. 30 Mar, 2021 1 commit
  20. 17 Mar, 2021 2 commits
  21. 08 Mar, 2021 1 commit
  22. 22 Feb, 2021 1 commit
    • David Feuer's avatar
      Make openFile exception safe · f90487ca
      David Feuer authored and Marge Bot's avatar Marge Bot committed
      * `openFile` could sometimes leak file descriptors if it
        received an asynchronous exception (#19114, #19115). Fix this
        on POSIX.
      
      * `openFile` and more importantly `openFileBlocking` could not
        be interrupted effectively during the `open` system call (#17912).
        Fix this on POSIX.
      
      * Implement `readFile'` using `withFile` to ensure the file is closed promptly on exception.
      
      * Avoid `bracket` in `withFile`, reducing the duration of masking.
      
      Closes #19130.
      
      Addresses #17912, #19114, and #19115 on POSIX systems, but not
      on Windows.
      f90487ca
  23. 14 Feb, 2021 3 commits
  24. 27 Jan, 2021 1 commit
    • Ben Gamari's avatar
      Add instances for GHC.Tuple.Solo · 5d6009a8
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      The `Applicative` instance is the most important one (for
      array/vector/sequence indexing purposes), but it deserves
      all the usual ones.
      
      T12545 does silly 1% wibbles both ways, it seems, maybe depending
      on architecture.
      
      Metric Increase:
          T12545
      
      Metric Decrease:
          T12545
      5d6009a8
  25. 18 Jan, 2021 2 commits
  26. 03 Jan, 2021 1 commit
  27. 22 Dec, 2020 1 commit
  28. 27 Oct, 2020 2 commits
  29. 13 Oct, 2020 1 commit
    • Rinat Striungis's avatar
      Unification of Nat and Naturals · 8f4f5794
      Rinat Striungis authored
      This commit removes the separate kind 'Nat' and enables promotion
      of type 'Natural' for using as type literal.
      It partially solves #10776
      
      Now the following code will be successfully typechecked:
          data C = MkC Natural
          type CC = MkC 1
      
      Before this change we had to create the separate type for promotion
          data C = MkC Natural
          data CP = MkCP Nat
          type CC = MkCP 1
      
      But CP is uninhabited in terms.
      
      For backward compatibility type synonym `Nat` has been made:
          type Nat = Natural
      
      The user's documentation and tests have been updated.
      The haddock submodule also have been updated.
      8f4f5794
  30. 01 Oct, 2020 1 commit
  31. 19 Sep, 2020 1 commit
  32. 30 Jun, 2020 1 commit