git.iko.soy/typeable/ordered-containers
on master help sign in
minor tweaks
commit7662f5aab4970bdd44ba5ab5c8b282de6cf7f613 authorDaniel Wagner <me@dmwit.com> dateSun 24 Mar 2019, 11:28 (8 years ago) parent759e4db
3 files changed+4−13
Data/Map/Ordered.hs+1−2 Data/Set/Ordered.hs+3−4 ordered-containers.cabal−7
Data/Map/Ordered.hs+1−2
@@ -50,7 +50,6 @@ instance (Ord k, Read k, Read v) => Read (OMap k v) where readsPrec = readsPrecL
5050
5151-- This instance preserves data abstraction at the cost of inefficiency.
5252-- We provide limited reflection services for the sake of data abstraction.
53−
5453instance (Data k, Data a, Ord k) => Data (OMap k a) where
5554 gfoldl f z m = z fromList `f` assocs m
5655 toConstr _ = fromListConstr
@@ -58,7 +57,7 @@ instance (Data k, Data a, Ord k) => Data (OMap k a) where
5857 1 -> k (z fromList)
5958 _ -> error "gunfold"
6059 dataTypeOf _ = oMapDataType
61− dataCast2 f = gcast2 f
60+ dataCast2 = gcast2
6261
6362fromListConstr :: Constr
6463fromListConstr = mkConstr oMapDataType "fromList" [] Prefix
Data/Set/Ordered.hs+3−4
@@ -7,7 +7,7 @@ module Data.Set.Ordered
77 -- * Trivial sets
88 , empty, singleton
99 -- * Insertion
10− -- | Conventionts:
10+ -- | Conventions:
1111 --
1212 -- * The open side of an angle bracket points to an 'OSet'
1313 --
@@ -48,15 +48,14 @@ instance (Ord a, Read a) => Read (OSet a) where readsPrec = readsPrecList fromLi
4848
4949-- This instance preserves data abstraction at the cost of inefficiency.
5050-- We provide limited reflection services for the sake of data abstraction.
51−
5251instance (Data a, Ord a) => Data (OSet a) where
53− gfoldl f z set = z fromList `f` (toList set)
52+ gfoldl f z set = z fromList `f` toList set
5453 toConstr _ = fromListConstr
5554 gunfold k z c = case constrIndex c of
5655 1 -> k (z fromList)
5756 _ -> error "gunfold"
5857 dataTypeOf _ = oSetDataType
59− dataCast1 f = gcast1 f
58+ dataCast1 = gcast1
6059
6160fromListConstr :: Constr
6261fromListConstr = mkConstr oSetDataType "fromList" [] Prefix
ordered-containers.cabal−7
@@ -1,15 +1,10 @@
1−-- Initial ordered-containers.cabal generated by cabal init. For further
2−-- documentation, see http://haskell.org/cabal/users-guide/
3−
41name: ordered-containers
52version: 0.1.1
63synopsis: Set- and Map-like types that remember the order elements were inserted
7−-- description:
84license: BSD3
95license-file: LICENSE
106author: Daniel Wagner
117maintainer: me@dmwit.com
12−-- copyright:
138category: Data
149build-type: Simple
1510extra-source-files: ChangeLog.md
@@ -22,8 +17,6 @@ source-repository head
2217library
2318 exposed-modules: Data.Map.Ordered, Data.Set.Ordered
2419 other-modules: Data.Map.Util
25− -- other-extensions:
2620 build-depends: base >=4.7 && <5, containers >=0.1 && <0.7
27− -- hs-source-dirs:
2821 default-language: Haskell98
2922 ghc-options: -fno-warn-tabs