| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
...several modules in `base` recently touched by me
|
|
|
|
|
|
| |
This is preparatory refactoring for avoiding import cycles
when `Data.Traversable` will be imported by `Control.Monad` and
`Data.List` for implementing #9586
|
|
|
|
|
|
|
|
|
|
|
| |
This is necessary in order to invert the import-dependency between
Data.Foldable and Control.Monad (for addressing #9586)
This also updates the `binary` submodule to qualify a GHC.Base import
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D223
|
|
|
|
|
|
|
|
|
| |
This allows several modules to avoid importing Control.Monad and thus break
import cycles that manifest themselves when implementing #9586
Reviewed By: austin, ekmett
Differential Revision: https://phabricator.haskell.org/D222
|
|
|
|
|
|
|
| |
Since we now had to major bump due to AMP being landed, `base-4.7.1.0` is not
gonna happen, as we're going straight for a `base-4.8.0.0` release.
[skip ci] since this is a doc-only change
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It basically changes
prefix ++ getpid() ++ seq_no ++ suffix
for
prefix ++ rand() ++ rand() ++ suffix
Which make any call to 'openTempFile' finish without loops.
Bug-report: https://ghc.haskell.org/trac/ghc/ticket/9058
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
| |
This is a follow-up to 77ea2eb0ab36d1a (re #9016) which added `die` with a
return type of `IO ()` even though all other functions in System.Exit have
the more general return type `IO a`. It is assumed this was an oversight in
the original proposal.
Acked-by: Edward Kmett <ekmett@gmail.com>
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
| |
The original proposal discussion can be found at
http://thread.gmane.org/gmane.comp.lang.haskell.libraries/20872
Note this also updates the Haddock submodule to remove Hadock's local
`die` implementation.
|
|
|
|
| |
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
| |
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: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
|
|
|
|
|
|
| |
I accidentally forgot to commit this.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes language pragmas from Haskell modules which are implicitly
active with `default-language: Haskell2010`. Specifically, the following
language extension pragmas are removed by this commit:
- PatternGuards
- ForeignFunctionInterface
- EmptyDataDecls
- NoBangPatterns
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The now obsolete (and redundant) `#hide` pragmas have been superseded by
`{-# OPTIONS_HADDOCK hide #-}` pragmas which are used by most of the
affected modules anyway.
This commit also adds proper `{-# OPTIONS_HADDOCK hide #-}` pragmas to
`GHC.Desugar` and `GHC.IO.Encoding.Iconv` which had only the ineffective
`#hide` annotation.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
| |
This commit retroactively adds `/Since: 4.4.0.0/` annotations to symbols
newly added/exposed in `base-4.4.0.0` (as shipped with GHC 7.2.1).
See also 6368362f which adds the respective annotation for symbols newly
added in `base-4.7.0.0` (that goes together with GHC 7.8.1).
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
| |
This commit retroactively adds `/Since: 4.5.[01].0/` annotations to symbols
newly added/exposed in `base-4.5.[01].0` (as shipped with GHC 7.4.[12]).
See also 6368362f which adds the respective annotation for symbols newly
added in `base-4.7.0.0` (that goes together with GHC 7.8.1).
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
| |
This commit retroactively adds `/Since: 4.6.0.0/` annotations to symbols
newly added/exposed in `base-4.6.0.0` (as shipped with GHC 7.6.1).
See also 6368362f which adds the respective annotation for symbols newly
added in `base-4.7.0.0` (that goes together with GHC 7.8.1).
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These annotations were added in such a way, that the line
{{{
/Since: 4.7.0.0/
}}}
represents the last paragraph of the Haddock comment.
Maybe Haddock will have support for this meta-syntax at some point, and
be able to inherited the since-version property to the children of an
annotated symbol and display the since-version property in the rendered
documentation only in cases when it's not visually obvious (for
instance, when re-exporting documentation strings).
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
| |
With GHC 7.8's PolyKinds the macros in `<Typeable.h>` are no longer of any
use, and their use is clearly obsolete. The sites using those macros are
replaced by auto-derivations of `Typeable` instances.
This reduces reliance on the CPP extension and the compile dependency on
`Typeable.h` in a couple of modules.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
| |
Now that HUGS and NHC specific code has been removed, this commit "folds"
the now redundant `#if((n)def)`s containing `__GLASGOW_HASKELL__`. This
renders `base` officially GHC only.
This commit also removes redundant `{-# LANGUAGE CPP #-}`.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
| |
For rationale. see
http://permalink.gmane.org/gmane.comp.lang.haskell.ghc.devel/2349
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
| |
Patch from Simon Hengel.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The basic idea is to use the Timer Manager rather than spawning an
auxilliary thread to handle timeouts; this was proposed by Bas van Dijk
two years ago (#4963), and recently by Herbert Valerio. The key idea
to make this work is to spawn an auxilliary thread for the delivery
of the Timeout exception. This idea as well as most of the code is due
to Akio Takano.
|
| |
|
|
|
|
|
|
|
| |
If
defined(__GLASGOW_HASKELL__) || defined(__HUGS__)
was False then compilation would have failed anyway, e.g. due to a
missing definition for annotateIOError.
|
| |
|
| |
|
|
|
|
| |
Submitted by: Nathan Hüsken <nathan.huesken@posteo.de>
|
|
|
|
|
|
| |
(which is not true on QNXNTO).
Submitted by: Stephen Paul Weber <singpolyma@singpolyma.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now, we only have
data AsyncException
= StackOverflow
| HeapOverflow
| ThreadKilled
| ...
so it is not possible to add another async exception. For instance,
the Timeout exception in System.Timeout should really be an async
exception.
This patch adds a superclass for all async exceptions:
data SomeAsyncException = forall e . Exception e => SomeAsyncException e
deriving Typeable
and makes the existing AsyncException and Timeout children of
SomeAsyncException in the hierarchy.
|
|
|
|
| |
Needed for #7342
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These comments are rather less useful now that haddock can give docs
with the same informatino in the module synopsis.
Having to maintain them when making changes to the library is a pain,
and when people forget about doing so there is nothing that checks that
the comments are right, so mistakes tend to linger.
Of the comments that my script detected, 78 of 684 were already
incorrect in one way or another, e.g. missing context:
Text.Show.showsPrec
Comment type: Int -> a -> ShowS
Actual type: Show a => Int -> a -> ShowS
wrong context:
Numeric.readInt
Comment type: Integral a => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a
Actual type: Num a => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a
not following a class change (e.g. Num losing its Eq superclass):
Text.Read.Lex.readOctP
Comment type: Num a => ReadP a
Actual type: (Eq a, Num a) => ReadP a
not following the Exceptions change:
GHC.Conc.childHandler
Comment type: Exception -> IO ()
Actual type: SomeException -> IO ()
or just always been wrong:
GHC.Stable.deRefStablePtr
Comment type: StablePtr a -> a
Actual type: StablePtr a -> IO a
|
| |
|
| |
|
|
|
|
| |
Patch by Johan Tibell <johan.tibell@gmail.com>
|
|
|
|
| |
This completes the proposal from trac #4865.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Add openNewFile function, which creates a new file and returns a file
descriptor for it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Win64, ssize_t is 64 bit, but functions like read return 32 bit
ints. The CAPI wrapper means the C compiler takes care of doing all
the necessary casting.
Technically we should instead be making the types of the FFI imports
different on different platforms, but I think this will work out
simpler overall.
Before this fix, when the functions failed with -1, we thought they
were returning with 4294967295, and so didn't throw an exception.
This lead to a segfault in echo001(ghci).
|
| |
|
| |
|
| |
|