@@ -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:
12 -- * The open side of an angle bracket points to an 'OSet'
12 -- * The open side of an angle bracket points to an 'OSet'
@@ -48,15 +48,14 @@ instance (Ord a, Read a) => Read (OSet a) where readsPrec = readsPrecList fromLi
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.
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
61fromListConstr :: Constr
60fromListConstr :: Constr
62fromListConstr = mkConstr oSetDataType "fromList" [] Prefix
61fromListConstr = mkConstr oSetDataType "fromList" [] Prefix