summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Data/Operations.hs
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-04-28 13:56:20 +0000
committerhallgren <hallgren@chalmers.se>2014-04-28 13:56:20 +0000
commit2721f7358f5c33c48ff24817ec787c3db678ad8a (patch)
treebb232f5723bec56f93c446ff34d5f5479946f975 /src/compiler/GF/Data/Operations.hs
parentb5fd7d88c107e80454696980bb7a9b6b74cb018c (diff)
Spring cleaning
Nothing major...
Diffstat (limited to 'src/compiler/GF/Data/Operations.hs')
-rw-r--r--src/compiler/GF/Data/Operations.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/compiler/GF/Data/Operations.hs b/src/compiler/GF/Data/Operations.hs
index 501cdfd55..cd42156d4 100644
--- a/src/compiler/GF/Data/Operations.hs
+++ b/src/compiler/GF/Data/Operations.hs
@@ -31,7 +31,9 @@ module GF.Data.Operations (-- * misc functions
lookupTree, --lookupTreeMany,
lookupTreeManyAll, updateTree,
buildTree, filterBinTree,
- sorted2tree, mapTree, mapMTree, tree2list,
+ --sorted2tree,
+ mapTree, --mapMTree,
+ tree2list,
-- * printing
@@ -167,16 +169,16 @@ updateTree (a,b) = Map.insert a b
buildTree :: (Ord a) => [(a,b)] -> BinTree a b
buildTree = Map.fromList
-
+{-
sorted2tree :: Ord a => [(a,b)] -> BinTree a b
sorted2tree = Map.fromAscList
-
+-}
mapTree :: ((a,b) -> c) -> BinTree a b -> BinTree a c
mapTree f = Map.mapWithKey (\k v -> f (k,v))
-
+{-
mapMTree :: (Ord a,Monad m) => ((a,b) -> m c) -> BinTree a b -> m (BinTree a c)
mapMTree f t = liftM Map.fromList $ sequence [liftM ((,) k) (f (k,x)) | (k,x) <- Map.toList t]
-
+-}
filterBinTree :: Ord a => (a -> b -> Bool) -> BinTree a b -> BinTree a b
filterBinTree = Map.filterWithKey