summaryrefslogtreecommitdiff
path: root/libraries/base/Data/Unique.hs
Commit message (Collapse)AuthorAgeFilesLines
* Correct doctestsOleg Grenrus2021-01-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove all the unnecessary LANGUAGE pragmasHécate2020-08-051-1/+0
|
* Update `base` packageSylvain Henry2020-06-171-2/+1
| | | | | | | | | | | | | | | * GHC.Natural isn't implemented in `base` anymore. It is provided by ghc-bignum in GHC.Num.Natural. It means that we can safely use Natural primitives in `base` without fearing issues with built-in rewrite rules (cf #15286) * `base` doesn't conditionally depend on an integer-* package anymore, it depends on ghc-bignum * Some duplicated code in integer-* can now be factored in GHC.Float * ghc-bignum tries to use a uniform naming convention so most of the other changes are renaming
* Loads of doc(test)sDavid Luposchainsky2017-08-171-1/+10
|
* base: drop redundant Typeable derivingsHerbert Valerio Riedel2015-03-071-3/+2
| | | | | | | | | | | Thanks to #9858 `Typeable` doesn't need to be explicitly derived anymore. This also makes `AutoDeriveTypeable` redundant, as well as some imports of `Typeable` (removal of whose may be beneficial to #9707). This commit removes several such now redundant use-sites in `base`. Reviewed By: austin, ekmett Differential Revision: https://phabricator.haskell.org/D712
* Remove redundant explicit `Prelude` importsHerbert Valerio Riedel2014-10-191-2/+0
| | | | Since they're implied by the lack of `NoImplicitPrelude`
* Replace DeriveDataTypeable by AutoDeriveTypeableHerbert Valerio Riedel2014-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Constant-fold `__GLASGOW_HASKELL__` CPP conditionalsHerbert Valerio Riedel2013-09-171-15/+1
| | | | | | | | | | 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>
* Change a use of atomicModifyIORef to atomicModifyIORef'Ian Lynagh2013-06-081-2/+6
| | | | Resulting core is unchanged.
* Remove commented types in module export listsIan Lynagh2012-10-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use IORef/atomicModifyIORef instead of STMSimon Marlow2012-05-031-8/+14
| | | | | Follows discussion on the libraries@ mailing list; see comments for rationale.
* SafeHaskell: Added SafeHaskell to baseDavid Terei2011-06-181-0/+1
|
* Use explicit language extensions & remove extension fields from base.cabalsimonpj@microsoft.com2011-01-281-0/+6
| | | | | | | | | | 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.
* add Typeable instanceSimon Marlow2010-05-041-1/+6
|
* Write the thunk 'next' to the MVarBas van Dijk2010-03-191-1/+1
|
* change to use STM, fixing 4 thingsSimon Marlow2010-03-181-8/+15
| | | | | | | | 1. there was no async exception protection 2. there was a space leak (now new value is strict) 3. using atomicModifyIORef would be slightly quicker, but can suffer from adverse scheduling issues (see #3838) 4. also, the STM version is faster.
* Add missing filesIan Lynagh2008-09-041-0/+59
|
* Split off the concurrent hierarchy (concurrent, unique, timeout)Ian Lynagh2008-08-241-59/+0
|
* Move Integer out into its own packageIan Lynagh2008-03-231-5/+3
| | | | | | | We now depend on the new integer package. We also depend on a new ghc-prim package, which has GHC.Prim, GHC.PrimopWrappers, and new modules GHC.Bool and GHC.Generics, containing Bool and Unit/Inl/Inr respectively.
* untabifyDon Stewart2008-03-081-5/+5
|
* [project @ 2002-07-23 10:46:27 by ross]ross2002-07-231-2/+2
| | | | Make Data.Unique work with Hugs.
* [project @ 2002-05-28 16:32:45 by simonmar]simonmar2002-05-281-1/+11
| | | | Documentation
* [project @ 2002-05-09 13:16:29 by simonmar]simonmar2002-05-091-1/+1
| | | | Rename libraries/core to libraries/base in the module headers.
* [project @ 2002-04-26 13:34:05 by simonmar]simonmar2002-04-261-2/+0
| | | | | Remove \$Id\$ from all files: it isn't particularly useful (see previous discussion on cvs-ghc@haskell.org), and it confuses Haddock.
* [project @ 2002-04-24 16:31:37 by simonmar]simonmar2002-04-241-2/+2
| | | | | Add the single character '|' to the header comment of each module so that Haddock will parse it as the module documentation.
* [project @ 2001-07-04 10:48:39 by simonmar]simonmar2001-07-041-0/+53
Add 4 new libraries