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. 13 Dec, 2016 1 commit
    • Ben Gamari's avatar
      base: Make raw buffer IO operations more strict · cc2e3ec0
      Ben Gamari authored
      Ticket #9696 reported that `readRawBufferPtr` and `writeRawBufferPtr`
      allocated unnecessarily. The binding is question was,
      ```
      let {
        buf_s4VD [Dmd=<L,U(U)>] :: GHC.Ptr.Ptr GHC.Word.Word8
        [LclId, Unf=OtherCon []] =
            NO_CCS GHC.Ptr.Ptr! [ds1_s4Vy];
      } in
        case
            GHC.IO.FD.$wreadRawBufferPtr
                Main.main5
                0#
                0#
                buf_s4VD
                Main.main4
                Main.main3
                GHC.Prim.void#
        of ...
      ```
      The problem was that GHC apparently couldn't tell that
      `readRawBufferPtr` would always demand the buffer. Here we simple add
      bang patterns on all of the small arguments of these functions to ensure
      that worker/wrappers can eliminate these allocations.
      
      Test Plan: Look at STG produced by testcase in #9696, verify no
      allocations
      
      Reviewers: austin, hvr, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: RyanGlScott, simonmar, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2813
      
      GHC Trac Issues: #9696
      cc2e3ec0
  2. 06 Jun, 2016 1 commit
  3. 19 May, 2016 1 commit
  4. 05 Mar, 2016 1 commit
  5. 16 Dec, 2015 1 commit
    • Herbert Valerio Riedel's avatar
      Start using `-W` instead of `-f(no-)warn` in some places · 437ebdda
      Herbert Valerio Riedel authored
      This replaces some occurences of `-f(no-)warn` with the new `-W`-aliases
      introduced via 2206fa8c / #11218, in cases which are guaranteed
      to be invoked with recent enough GHC (i.e. the stage1+ GHC).
      
      After this commit, mostly the compiler and the testsuite remain using
      `-f(wo-)warn...` because the compiler needs to be bootstrappable with
      older GHCs, while for the testsuite it's convenient to be able to quickly
      compare the behavior to older GHCs (which may not support the new flags yet).
      
      The compiler-part can be updated to use the new flags once GHC 8.3 development
      starts.
      
      Reviewed By: quchen
      
      Differential Revision: https://phabricator.haskell.org/D1637
      437ebdda
  6. 07 Mar, 2015 1 commit
  7. 24 Sep, 2014 1 commit
  8. 19 Sep, 2014 1 commit
  9. 18 Sep, 2014 1 commit
  10. 16 Sep, 2014 1 commit
  11. 28 Jul, 2014 1 commit
    • Isamu Mogi's avatar
      Avoid to pass a socket to setmode/isatty in Windows · b9be82d4
      Isamu Mogi authored
      Summary:
      In Windows, a socket is not a file descriptor. So passing it to
      setmode/isatty causes an error that returns EABF and triggers invalid
      parameter handler.
      
      Test Plan:
      1. Add WinDbg as a postmortem debugger (C:\>windbg -I)
      2. Pass a socket to GHC.IO.Device.IODevice.isTerminal / GHC.IO.FD.fdToHandle'  (Executing 'cabal update' calls each functions with the socket in cabal-install 1.20.0.1)
      3. WinDbg pops up and outputs error message: "Invalid parameter passed to C runtime function."
      4. Apply the patch
      5. Redo step 2
      6. WinDbg doesn't pop up
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: phaskell, simonmar, relrod, carter
      
      Differential Revision: https://phabricator.haskell.org/D92
      b9be82d4
  12. 27 May, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Replace DeriveDataTypeable by AutoDeriveTypeable · 6ed54303
      Herbert Valerio Riedel authored
      
      
      This is a first step towards addressing #9111
      
      This results in the following additional Typeable (exported) instances
      being generated (list was compiled by diff'ing hoogle txt output):
      
        instance Typeable CFile
        instance Typeable 'CFile
        instance Typeable CFpos
        instance Typeable 'CFpos
        instance Typeable CJmpBuf
        instance Typeable 'CJmpBuf
        instance Typeable ChItem
        instance Typeable QSem
        instance Typeable ID
        instance Typeable 'ID
        instance Typeable CONST
        instance Typeable Qi
        instance Typeable Qr
        instance Typeable Mp
        instance Typeable ConstrRep
        instance Typeable Fixity
        instance Typeable 'Prefix
        instance Typeable 'Infix
        instance Typeable Constr
        instance Typeable DataType
        instance Typeable DataRep
        instance Typeable Data
        instance Typeable HasResolution
        instance Typeable IsList
      Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
      6ed54303
  13. 02 Oct, 2013 1 commit
    • Austin Seipp's avatar
      Fix Windows build. · 47dd3c22
      Austin Seipp authored
      
      
      In dfb52c3d the default language was set to Haskell2010 - by default,
      GHC is less strict about the layout rule (controlled by
      -XNonincreasingIndentation), but not when we explicitly set the language
      to H2010. It turns out we relied on this behavior in the Windows build.
      
      Thanks to Reid Barton for pointing this out.
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      47dd3c22
  14. 28 Sep, 2013 1 commit
  15. 04 Feb, 2013 1 commit
  16. 17 Nov, 2012 1 commit
  17. 16 May, 2012 1 commit
  18. 08 May, 2012 2 commits
  19. 26 Oct, 2011 1 commit
  20. 25 Oct, 2011 1 commit
  21. 18 Jun, 2011 1 commit
  22. 14 May, 2011 1 commit
    • batterseapower's avatar
      Big patch to improve Unicode support in GHC. Validated on OS X and Windows, this · dc58b739
      batterseapower authored
      patch series fixes #5061, #1414, #3309, #3308, #3307, #4006 and #4855.
      
      The major changes are:
      
       1) Make Foreign.C.String.*CString use the locale encoding
      
          This change follows the FFI specification in Haskell 98, which
          has never actually been implemented before.
      
          The functions exported from Foreign.C.String are partially-applied
          versions of those from GHC.Foreign, which allows the user to supply
          their own TextEncoding.
      
          We also introduce foreignEncoding as the name of the text encoding
          that follows the FFI appendix in that it transliterates encoding
          errors.
      
       2) I also changed the code so that mkTextEncoding always tries the
          native-Haskell decoders in preference to those from iconv, even on
          non-Windows. The motivation here is simply that it is better for
          compatibility if we do this, and those are the ones you get for
          the utf* and latin1* predefined TextEncodings anyway.
      
       3) Implement surrogate-byte error handling mode for TextEncoding
      
          This implements PEP383-like behaviour so that we are able to
          roundtrip byte strings through Strings without loss of information.
      
          The withFilePath function now uses this encoding to get to/from CStrings,
          so any code that uses that will get the right PEP383 behaviour automatically.
      
       4) Implement three other coding failure modes: ignore, throw error, transliterate
      
          These mimic the behaviour of the GNU Iconv extensions.
      dc58b739
  23. 15 Apr, 2011 1 commit
  24. 29 Mar, 2011 1 commit
  25. 28 Jan, 2011 1 commit
  26. 21 Dec, 2010 1 commit
  27. 13 Dec, 2010 1 commit
  28. 06 Dec, 2010 1 commit
  29. 26 Nov, 2010 1 commit
    • bos's avatar
      Fix #4514 - IO manager deadlock · 79cf73c5
      bos authored
      * The public APIs for threadWaitRead and threadWaitWrite remain unchanged,
        and now throw an IOError if a file descriptor is closed behind their
        backs.  This behaviour is documented.
      
      * The GHC.Conc API is extended to add a closeFd function, the behaviour
        of which is documented.
      
      * Behind the scenes, we add a new evtClose event, which is used only when
        one thread closes a file descriptor that other threads are blocking on.
      
      * Both base's IO code and network use the new closeFd function.
      79cf73c5
  30. 17 Nov, 2010 1 commit
  31. 16 Nov, 2010 1 commit
  32. 15 Sep, 2010 1 commit
    • Simon Marlow's avatar
      Windows: map ERROR_NO_DATA to EPIPE, rather than EINVAL · deea031d
      Simon Marlow authored
      WriteFile() returns ERROR_NO_DATA when writing to a pipe that is
      "closing", however by default the write() wrapper in the CRT maps this
      to EINVAL so we get confusing things like
      
        hPutChar: invalid argument (Invalid Argumnet)
      
      when piping the output of a Haskell program into something that closes
      the pipe early.  This was happening in the testsuite in a few place.
      
      The solution is to map ERROR_NO_DATA to EPIPE correctly, as we
      explicitly check for EPIPE on stdout (in GHC.TopHandler) so we can
      exit without an error in this case.
      deea031d
  33. 07 Sep, 2010 1 commit
  34. 10 Aug, 2010 1 commit
  35. 13 Apr, 2010 1 commit
  36. 05 Aug, 2009 1 commit
  37. 11 Jul, 2009 1 commit
  38. 10 Jul, 2009 1 commit
  39. 07 Jul, 2009 1 commit