| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
* Remove unused/old flags from the structs
* Update old comments
* Add missing flags to GHC.RTS
* Simplify GHC.RTS, remove C code and use hsc2hs instead
* Make ParFlags unconditional, and add support to GHC.RTS
|
| |
|
|
|
|
|
|
|
| |
Simplify some preprocessor expressions involving `_MSC_VER` because
`_WIN32` is always defined when `_MSC_VER` is.
Differential Revision: https://phabricator.haskell.org/D981
|
|
|
|
|
|
|
|
|
|
| |
In Haskell files, replace `__MINGW32__` by `mingw32_HOST_OS`.
In .c and .h files, delete `__MINGW32__` when `_WIN32` is also tested
because `_WIN32` is always defined when `__MINGW32__` is. Also replace
`__MINGW32__` by `_WIN32` when used standalone for consistency.
Differential Revision: https://phabricator.haskell.org/D971
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Implementation of #5364. Mostly boilerplate, reading FILE fields is missing.
Test Plan:
- Get some feedback on missing parts. (FILE fields)
- Get some feedback on module name.
- Get some feedback on other things.
- Get code reviewed.
- Make sure test suite is passing. (I haven't run it myself)
Reviewers: hvr, austin, ezyang
Reviewed By: ezyang
Subscribers: ekmett, simonmar, ezyang, carter, thomie
Differential Revision: https://phabricator.haskell.org/D306
GHC Trac Issues: #5364
Conflicts:
includes/rts/Flags.h
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Update Unicode data to version 7.0
Reviewers: rwbarton, austin
Reviewed By: austin
Subscribers: thomie, carter, ezyang, simonmar
Differential Revision: https://phabricator.haskell.org/D316
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids the import-cycle caused by the import of `Foreign.C.Types`
by using `Int` instead of `CInt` for the Unicode classification
functions. This refactoring also allows to remove a couple of
`fromIntegral`s.
Reviewed By: rwbarton, ekmett
Differential Revision: https://phabricator.haskell.org/D328
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
```
git grep -l '\(#ifdef \|#if defined\)(\?__GLASGOW_HASKELL__)\?'
```
Test Plan: validate
Reviewers: rwbarton, hvr, austin
Reviewed By: rwbarton, hvr, austin
Subscribers: rwbarton, simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D218
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
libraries/base/cbits/inputReady.c had no limits on file descriptors.
Add a limit as non-threaded RTS does.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Test Plan: none
Reviewers: austin, simonmar
Reviewed By: austin, simonmar
Subscribers: simonmar, relrod, carter
Differential Revision: https://phabricator.haskell.org/D28
|
|
|
|
| |
Patch from Simon Hengel.
|
| |
|
|
|
|
|
|
|
|
|
| |
Patch from Stephen Blackheath.
The issue here is that the #defines EVFILT_READ and EVFILT_WRITE have
the values -1 and -2. The original code translates that to
filterRead = Filter -1 which is wrong Haskell and fails to compile.
The modified code produces the correct code filterRead = Filter (-1)
|
| |
|
|
|
|
|
|
| |
(which is not true on QNXNTO).
Submitted by: Stephen Paul Weber <singpolyma@singpolyma.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the output of throwGetLastError to include the system error
message, rather than the message of our fictitious errno.
It also adds several definitions to GHC.Windows, mostly from the Win32 package.
The exceptions are:
* getErrorMessage: returns a String, unlike in System.Win32.Types,
where it returns an LPWSTR.
* errCodeToIOError: new
* c_maperrno_func: new
|
|
|
|
|
|
| |
Windows returns an EACCES error instead of EEXIST when a call to `open`
fails due to an existing directory, so add a special case for this
situation.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Fixes validate on amd64/Linux with:
SRC_CC_OPTS += -Wmissing-parameter-type
SRC_CC_OPTS += -Wold-style-declaration
SRC_CC_OPTS += -Wold-style-definition
|
|
|
|
| |
Patch from Daniel Fischer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instances of Typeable used to call mkTyCon:
mkTyCon :: String -> TyCon
which internally kept a table mapping Strings to Ints, so that each
TyCon could be given a unique Int for fast comparison. This meant the
String has to be unique across all types in the program. However,
derived instances of typeable used the qualified original
name (e.g. "GHC.Types.Int") which is not necessarily unique, is
non-portable, and exposes implementation details.
The String passed to mkTyCon is returned by
tyConString :: TyCon -> String
which let the user get at this non-portable representation (also the
Show instance returns this String).
Now we store three Strings in TyCon. The internal representation is
this:
data TyCon = TyCon {
tyConHash :: {-# UNPACK #-} !Fingerprint,
tyConPackage :: String,
tyConModule :: String,
tyConName :: String
}
(internal representations are now provided by Data.Typeable.Internal)
The fields of TyCon are not exposed via the public API. Together the
three fields tyConPackage, tyConModule and tyConName uniquely identify
a TyCon, and the Fingerprint is a hash of the concatenation of these
three Strings (so no more internal cache to map strings to unique
Ids). tyConString now returns the value of tyConName only, so is
therefore portable (but the String returned does not uniquely
identify the TyCon).
I've measured the performance impact of this change, and performance
seems to be uniformly better. This should improve things for SYB in
particular. Also, the size of the code generated for deriving
Typeable is less than half as much as before.
== API changes ==
=== mkTyCon is DEPRECATED ==
mkTyCon is used by some hand-written instances of Typeable. It still
works as before, but is deprecated in favour of...
=== Add mkTyCon3 ===
mkTyCon3 :: String -> String -> String -> TyCon
mkTyCon3 takes the package, module, and name of the TyCon respectively.
Most users can just derive Typeable, there's no need to use mkTyCon3.
In due course we can rename mkTyCon3 back to mkTyCon.
=== typeRepKey changed ===
Previously we had
typeRepKey :: TypeRep -> IO Int
but since we don't assign unique Ints to TypeReps any more, this is
difficult to implement. Instead we provide an abstract key type which
is an instance of Eq and Ord, and internally is implemented by the
fingerprint:
data TypeRepKey -- abstract, instance of Eq, Ord
typeRepKey :: TypeRep -> IO TypeRepKey
typeRepKey is still in the IO monad, because the Ord instance is
implementation-defined.
|
|
|
|
|
|
|
|
|
|
| |
Faster rounding functions for Double and float with Int or Integer results.
Fixes #2271.
Since some glibc's have buggy rintf or rint functions and the behaviour of
these functions depends on the setting of the rounding mode, we provide our
own implementations which always round ties to even.
Also added rewrite rules and removed trailing whitespace.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
(it causes warnings, and isn't used)
|
|
|
|
| |
nl_langinfo(CODESET) doesn't always return standardized variations of the encoding names. Use libcharset if possible, which is shipped together with GNU libiconv.
|
|
|
|
| |
C functions like isDoubleNaN moved here (primFloat.c)
|
| |
|
| |
|
|
|
|
| |
now that it isn't used on Windows any more.
|
| |
|
| |
|
|
|
|
| |
Patch from Sigbjorn Finne <sof@galois.com>
|
|
|
|
| |
Patch from Sigbjorn Finne <sof@galois.com>
|
|
|
|
|
| |
Stg.h is for .hc files only, and it sets up various global register
variables.
|
|
|
|
|
|
|
|
| |
Patch from kili@outback.escape.de, who says:
Stg.h must be included before HsBase.h, because the latter contains
function definitions causing older versions of gcc (3.3.5 in my
case) to bail out with "error: global register variable follows a
function definition" on Regs.h, which is included by Stg.h.
|
| |
|
| |
|
|
|
|
| |
System.Directory implements renameFile using unix/Win32 now.
|
| |
|
|
|
|
|
| |
Now we do the appropriate magic in fdReady() to detect when there is
real input available, as opposed to uninteresting console events.
|
|
|
|
| |
README.Unicode describes how to do updates in the future.
|