| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
As discussed at
https://github.com/haskell/core-libraries-committee/issues/36
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's simpler to assume that base is NoImplicitPrelude,
otherwise running doctest on `GHC.*` modules would be tricky.
OTOH, most `GHC.List` (where the most name clashes are) examples
could be changed to use `import qualified Data.List as L`.
(GHC.List examples won't show for Foldable methods...).
With these changes majority of doctest examples are GHCi-"faithful",
my WIP GHC-independent doctest runner reports nice summary:
Examples: 582; Tried: 546; Skipped: 34; Success: 515; Errors: 33; Property Failures 2
Most error cases are *Hangs forever*.
I have yet to figure out how to demonstrate that in GHCi.
Some of divergences are actually stack overflows, i.e. caught by
runtime.
Few errorful cases are examples of infinite output, e.g.
>>> cycle [42]
[42,42,42,42,42,42,42,42,42,42...
while correct, they confuse doctest.
Another erroneous cases are where expected output has line comment, like
>>> fmap show (Just 1) -- (a -> b) -> f a -> f b
Just "1" -- (Int -> String) -> Maybe Int -> Maybe String
I think I just have to teach doctest to strip comments from expected
output.
This is a first patch in a series.
There is plenty of stuff already.
|
|
|
|
|
|
|
|
|
|
|
|
| |
As noted in #18043, flushTrace failed flush anything beyond the writer.
This means that a significant amount of data sitting in capability-local
event buffers may never get flushed, despite the users' pleads for us to
flush.
Fix this by making flushEventLog flush all of the event buffers before
flushing the writer.
Fixes #18043.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This moves all URL references to Trac tickets to their corresponding
GitLab counterparts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This drastically cuts down on the number of Haddock warnings when making
docs for `base`. Plus this means more actual links end up in the docs!
Also fixed other small mostly markup issues in the documentation along
the way.
This is a docs-only change.
Reviewers: hvr, bgamari, thomie
Reviewed By: thomie
Subscribers: thomie, rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5055
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for injecting runtime calls to `trace` in `DsM`. This
allows the desugarer to add compile-time information to a runtime
trace.
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: carter, thomie, rwbarton
Differential Revision: https://phabricator.haskell.org/D4162
|
| |
|
|
|
|
| |
[skip-ci]
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari, hvr, austin
Reviewed By: bgamari, hvr, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1289
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This generalizes the type signatures of `traceM` and `traceShowM` to
use `Applicative` rather than `Monad`.
Reviewers: austin, ekmett, hvr, bgamari
Reviewed By: ekmett, hvr, bgamari
Subscribers: thomie, bgamari
Differential Revision: https://phabricator.haskell.org/D1029
GHC Trac Issues: #10023
|
|
|
|
| |
[skip ci]
|
|
|
|
| |
The remarks apply equally to all the functions here (Trac #9795)
|
|
|
|
| |
See Trac #9795.
|
|
|
|
|
|
| |
Starting with Haddock 2.16 there's a new built-in support for since-annotations
Note: This exposes a bug in the `@since` implementation (see e.g. `Data.Bits`)
|
| |
|
|
|
|
| |
...several modules in `base` recently touched by me
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This exposes *only* the type-classes w/o any of their methods.
This is the very first step for implementing BPP (see #9586), which
already requires breaking up several import-cycles leading back to `Prelude`.
Ideally, importing `Prelude` should be avoided in most `base` modules,
as `Prelude` does not define any entities, but rather re-exports
existing ones.
Test Plan: validate passes
Reviewers: ekmett, austin
Reviewed By: ekmett, austin
Subscribers: simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D209
GHC Trac Issues: #9586
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Previously, if you ran trace "foo\0bar", the output was truncated so
that everything after the null byte was omitted. This was terrible.
Now we filter out null bytes, and emit an extra trace saying that
null bytes were filtered out.
NB: we CANNOT fix debugBelch, because all printf variants *always*
respect null bytes, even if you're using string precision such as
%.*s. The alternative would have been to introduce a new function
debugRawBelch which did not use format strings and took an explicit
string length, but I decided we generally should avoid putting null
bytes in our trace messages, and warn the user.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: hvr, austin
Subscribers: simonmar, relrod, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D121
GHC Trac Issues: #9395
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the markup at the top of `Control.Arrow`, and improves the
markup inside DEPRECATED strings.
(Haddock supports markup inside DEPRECATED messages, which allows to
turn references to Haskell entities into hyperlinks by using the usual
Haddock markup.)
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Much like the traceEvent, but used for marking points in time during
execution for use in profiling tools. This uses the traceMarker# primop.
The underlying RTS code currently works for the eventlog system, but
could be extended to cover heap profiling.
|
|
|
|
| |
Debug.Trace.traceEventIO should be used instead.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
-- | like 'trace', but additionally prints a call stack if one is
-- available.
--
-- In the current GHC implementation, the call stack is only
-- availble if the program was compiled with @-prof@; otherwise
-- 'traceStack' behaves exactly like 'trace'. Entries in the call
-- stack correspond to @SCC@ annotations, so it is a good idea to use
-- @-fprof-auto@ to add SCC annotations automatically.
|
|
|
|
|
| |
putTraceMsg is deprecated in favour of traceIO. This makes the names
more consistent.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously traceEvent was exported only from GHC.Exts and had an IO
type. The new scheme is:
GHC.Exts.traceEventIO :: String -> IO ()
Debug.Trace.traceEventIO :: String -> IO ()
Debug.Trace.traceEvent :: String -> a -> a
The new traceEvent has a pure type like Debug.Trace.trace and can be
used in pure code. The previous GHC.Exts.traceEvent is deprecated.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add explicit {-# LANGUAGE xxx #-} pragmas to each module, that say
what extensions that module uses. This makes it clearer where
different extensions are used in the (large, variagated) base package.
Now base.cabal doesn't need any extensions field
Thanks to Bas van Dijk for doing all the work.
|
|
|
|
|
|
| |
Calling varargs functions is explicitly deprecated according to the
FFI specification. It used to work, just about, but it broke with the
recent changes to the via-C backend to not use header files.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
doc fix
|
|
|
|
| |
Make it compile for non-GHC.
|
|
|
|
| |
import CString on non-windows platforms.
|
|
|
|
|
|
|
|
| |
- The output from uncaught exceptions handler is redirected to RTS's errorBelch.
- The output from Debug.Trace is redirected to RTS's debugBelch
- Usually errorBelch and debugBelch messages go to stderr except for
Windows GUI applications. For GUI applications the Debug.Trace output is
redirected to debug console and the exceptions message is displayed in message box.
|
|
|
|
| |
Remove unnecessary ghcconfig.h include
|