| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add @since annotations to instances in `base`.
Test Plan:
* ./validate # some commets shouldn't break the build
* review the annotations for absurdities.
Reviewers: ekmett, goldfire, RyanGlScott, austin, hvr, bgamari
Reviewed By: RyanGlScott, hvr, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2277
GHC Trac Issues: #11767
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHC.Generics provides several representation data types that have
obvious instances of various type classes in base, along with various
other types of meta-data (such as associativity and fixity).
Specifically, instances have been added for the following type classes
(where possible):
- Applicative
- Data
- Functor
- Monad
- MonadFix
- MonadPlus
- MonadZip
- Foldable
- Traversable
- Enum
- Bounded
- Ix
- Generic1
Thanks to ocharles for starting this!
Test Plan: Validate
Reviewers: ekmett, austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: RyanGlScott, thomie
Differential Revision: https://phabricator.haskell.org/D1937
GHC Trac Issues: #9043
|
|
|
|
|
|
| |
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`)
|
| |
|
|
This adds the module `Data.Bifunctor` providing the
`Bifunctor(bimap,first,second)` class and a couple of instances
This module and the class were previously exported by the `bifunctors`
package. In contrast to the original module all `INLINE` pragmas have
been removed.
Reviewed By: ekmett, austin, dolio
Differential Revision: https://phabricator.haskell.org/D336
|