[commit: containers] master: Improve formatting of oneliners. (079c641)
Paolo Capriotti
p.capriotti at gmail.com
Tue May 8 00:55:16 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/containers
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/079c641cd2a250f77aeed9978b39e4996caddadf
>---------------------------------------------------------------
commit 079c641cd2a250f77aeed9978b39e4996caddadf
Author: Milan Straka <fox at ucw.cz>
Date: Mon Dec 12 12:12:42 2011 +0100
Improve formatting of oneliners.
>---------------------------------------------------------------
Data/IntMap/Base.hs | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/Data/IntMap/Base.hs b/Data/IntMap/Base.hs
index 793915c..a8dd2a4 100644
--- a/Data/IntMap/Base.hs
+++ b/Data/IntMap/Base.hs
@@ -1544,8 +1544,7 @@ keysSet m = IntSet.fromDistinctAscList (keys m)
-- > assocs empty == []
assocs :: IntMap a -> [(Key,a)]
-assocs
- = toAscList
+assocs = toAscList
{--------------------------------------------------------------------
@@ -1558,8 +1557,7 @@ assocs
-- > toList empty == []
toList :: IntMap a -> [(Key,a)]
-toList
- = toAscList
+toList = toAscList
-- | /O(n)/. Convert the map to a list of key\/value pairs where the
-- keys are in ascending order. Subject to list fusion.
@@ -1567,8 +1565,7 @@ toList
-- > toAscList (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")]
toAscList :: IntMap a -> [(Key,a)]
-toAscList
- = foldrWithKey (\k x xs -> (k,x):xs) []
+toAscList = foldrWithKey (\k x xs -> (k,x):xs) []
#if __GLASGOW_HASKELL__
-- List fusion for the list generating functions
More information about the Cvs-libraries
mailing list