summaryrefslogtreecommitdiff
path: root/src/GF/Grammar/Values.hs
diff options
context:
space:
mode:
authoraarne <unknown>2003-09-24 14:26:35 +0000
committeraarne <unknown>2003-09-24 14:26:35 +0000
commit6e9258558a9bcb8c9df4bee0382b5136c95f516a (patch)
tree99475ee58ba264780403480ce29c9ee40beee1ec /src/GF/Grammar/Values.hs
parentb1402e8bd6a68a891b00a214d6cf184d66defe19 (diff)
Improvements in hte editor.
Diffstat (limited to 'src/GF/Grammar/Values.hs')
-rw-r--r--src/GF/Grammar/Values.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/GF/Grammar/Values.hs b/src/GF/Grammar/Values.hs
index 7b02d187a..9df2fc13e 100644
--- a/src/GF/Grammar/Values.hs
+++ b/src/GF/Grammar/Values.hs
@@ -50,3 +50,11 @@ tree2exp (Tr (N (bi,at,_,_,_),ts)) = foldr Abs (foldl App at' ts') bi' where
AtI s -> EInt s
bi' = map fst bi
ts' = map tree2exp ts
+
+loc2treeFocus :: Loc TrNode -> Tree
+loc2treeFocus (Loc (Tr (a,ts),p)) =
+ loc2tree (Loc (Tr (mark a, map (mapTr nomark) ts), mapPath nomark p))
+ where
+ (mark, nomark) = (\(N (a,b,c,d,_)) -> N(a,b,c,d,True),
+ \(N (a,b,c,d,_)) -> N(a,b,c,d,False))
+