git.iko.soy/typeable/ordered-containers
on master help sign in
whitespace only
759e4dbDaniel Wagner
Data/Map/Ordered.hs+7−7
@@ -52,13 +52,13 @@ instance (Ord k, Read k, Read v) => Read (OMap k v) where readsPrec = readsPrecL
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
53
54instance (Data k, Data a, Ord k) => Data (OMap k a) where
54instance (Data k, Data a, Ord k) => Data (OMap k a) where
55− gfoldl f z m = z fromList `f` assocs m
55+ gfoldl f z m = z fromList `f` assocs m
56− toConstr _ = fromListConstr
56+ toConstr _ = fromListConstr
57− gunfold k z c = case constrIndex c of
57+ gunfold k z c = case constrIndex c of
58− 1 -> k (z fromList)
58+ 1 -> k (z fromList)
59− _ -> error "gunfold"
59+ _ -> error "gunfold"
60− dataTypeOf _ = oMapDataType
60+ dataTypeOf _ = oMapDataType
61− dataCast2 f = gcast2 f
61+ dataCast2 f = gcast2 f
62
62
63fromListConstr :: Constr
63fromListConstr :: Constr
64fromListConstr = mkConstr oMapDataType "fromList" [] Prefix
64fromListConstr = mkConstr oMapDataType "fromList" [] Prefix
Data/Set/Ordered.hs+7−7
@@ -50,13 +50,13 @@ instance (Ord a, Read a) => Read (OSet a) where readsPrec = readsPrecList fromLi
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
51
52instance (Data a, Ord a) => Data (OSet a) where
52instance (Data a, Ord a) => Data (OSet a) where
53− gfoldl f z set = z fromList `f` (toList set)
53+ gfoldl f z set = z fromList `f` (toList set)
54− toConstr _ = fromListConstr
54+ toConstr _ = fromListConstr
55− gunfold k z c = case constrIndex c of
55+ gunfold k z c = case constrIndex c of
56− 1 -> k (z fromList)
56+ 1 -> k (z fromList)
57− _ -> error "gunfold"
57+ _ -> error "gunfold"
58− dataTypeOf _ = oSetDataType
58+ dataTypeOf _ = oSetDataType
59− dataCast1 f = gcast1 f
59+ dataCast1 f = gcast1 f
60
60
61fromListConstr :: Constr
61fromListConstr :: Constr
62fromListConstr = mkConstr oSetDataType "fromList" [] Prefix
62fromListConstr = mkConstr oSetDataType "fromList" [] Prefix