git.iko.soy/typeable/ordered-containers
on master help sign in
minor tweaks
7662f5aDaniel Wagner
Data/Map/Ordered.hs+1−2
@@ -50,7 +50,6 @@ instance (Ord k, Read k, Read v) => Read (OMap k v) where readsPrec = readsPrecL
50
50
51-- This instance preserves data abstraction at the cost of inefficiency.
51-- This instance preserves data abstraction at the cost of inefficiency.
52-- We provide limited reflection services for the sake of data abstraction.
52-- We provide limited reflection services for the sake of data abstraction.
53−
54instance (Data k, Data a, Ord k) => Data (OMap k a) where
53instance (Data k, Data a, Ord k) => Data (OMap k a) where
55 gfoldl f z m = z fromList `f` assocs m
54 gfoldl f z m = z fromList `f` assocs m
56 toConstr _ = fromListConstr
55 toConstr _ = fromListConstr
@@ -58,7 +57,7 @@ instance (Data k, Data a, Ord k) => Data (OMap k a) where
58 1 -> k (z fromList)
57 1 -> k (z fromList)
59 _ -> error "gunfold"
58 _ -> error "gunfold"
60 dataTypeOf _ = oMapDataType
59 dataTypeOf _ = oMapDataType
61− dataCast2 f = gcast2 f
60+ dataCast2 = gcast2
62
61
63fromListConstr :: Constr
62fromListConstr :: Constr
64fromListConstr = mkConstr oMapDataType "fromList" [] Prefix
63fromListConstr = mkConstr oMapDataType "fromList" [] Prefix
Data/Set/Ordered.hs+3−4
@@ -7,7 +7,7 @@ module Data.Set.Ordered
7 -- * Trivial sets
7 -- * Trivial sets
8 , empty, singleton
8 , empty, singleton
9 -- * Insertion
9 -- * Insertion
10− -- | Conventionts:
10+ -- | Conventions:
11 --
11 --
12 -- * The open side of an angle bracket points to an 'OSet'
12 -- * The open side of an angle bracket points to an 'OSet'
13 --
13 --
@@ -48,15 +48,14 @@ instance (Ord a, Read a) => Read (OSet a) where readsPrec = readsPrecList fromLi
48
48
49-- This instance preserves data abstraction at the cost of inefficiency.
49-- This instance preserves data abstraction at the cost of inefficiency.
50-- We provide limited reflection services for the sake of data abstraction.
50-- We provide limited reflection services for the sake of data abstraction.
51−
52instance (Data a, Ord a) => Data (OSet a) where
51instance (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
54 toConstr _ = fromListConstr
53 toConstr _ = fromListConstr
55 gunfold k z c = case constrIndex c of
54 gunfold k z c = case constrIndex c of
56 1 -> k (z fromList)
55 1 -> k (z fromList)
57 _ -> error "gunfold"
56 _ -> error "gunfold"
58 dataTypeOf _ = oSetDataType
57 dataTypeOf _ = oSetDataType
59− dataCast1 f = gcast1 f
58+ dataCast1 = gcast1
60
59
61fromListConstr :: Constr
60fromListConstr :: Constr
62fromListConstr = mkConstr oSetDataType "fromList" [] Prefix
61fromListConstr = 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−
4name: ordered-containers
1name: ordered-containers
5version: 0.1.1
2version: 0.1.1
6synopsis: Set- and Map-like types that remember the order elements were inserted
3synopsis: Set- and Map-like types that remember the order elements were inserted
7−-- description:
8license: BSD3
4license: BSD3
9license-file: LICENSE
5license-file: LICENSE
10author: Daniel Wagner
6author: Daniel Wagner
11maintainer: me@dmwit.com
7maintainer: me@dmwit.com
12−-- copyright:
13category: Data
8category: Data
14build-type: Simple
9build-type: Simple
15extra-source-files: ChangeLog.md
10extra-source-files: ChangeLog.md
@@ -22,8 +17,6 @@ source-repository head
22library
17library
23 exposed-modules: Data.Map.Ordered, Data.Set.Ordered
18 exposed-modules: Data.Map.Ordered, Data.Set.Ordered
24 other-modules: Data.Map.Util
19 other-modules: Data.Map.Util
25− -- other-extensions:
26 build-depends: base >=4.7 && <5, containers >=0.1 && <0.7
20 build-depends: base >=4.7 && <5, containers >=0.1 && <0.7
27− -- hs-source-dirs:
28 default-language: Haskell98
21 default-language: Haskell98
29 ghc-options: -fno-warn-tabs
22 ghc-options: -fno-warn-tabs