summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2011-11-15 14:30:31 +0000
committerkr.angelov <kr.angelov@gmail.com>2011-11-15 14:30:31 +0000
commitb1a82e8e8a38047a736abef80d15a8b5e7d6beda (patch)
treefe410ac827b315b4ab5d1abb1589ec0082764bb4 /src
parent61c16f2eb2a042152a2b04f709d0cefe6e5a14df (diff)
the indirections in the .gf-tags files now point directly to the origin of the corresponding indentifiers
Diffstat (limited to 'src')
-rw-r--r--src/compiler/GF/Compile/Tags.hs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/compiler/GF/Compile/Tags.hs b/src/compiler/GF/Compile/Tags.hs
index f2c0db861..bf4a6e04d 100644
--- a/src/compiler/GF/Compile/Tags.hs
+++ b/src/compiler/GF/Compile/Tags.hs
@@ -62,17 +62,22 @@ getImports opts gr mo@(m,mi) = concatMap toDep allOpens
toDep (OSimple m,incl) =
let Ok mi = lookupModule gr m
- in [showIdent id ++ "\t" ++ "indir" ++ "\t" ++ showIdent m ++ "\t\t" ++ gf2gftags opts (msrc mi)
- | id <- Map.keys (jments mi), filter incl id]
+ in [showIdent id ++ "\t" ++ "indir" ++ "\t" ++ showIdent m ++ "\t\t" ++ gf2gftags opts (orig mi info)
+ | (id,info) <- Map.toList (jments mi), filter incl id]
toDep (OQualif m1 m2,incl) =
let Ok mi = lookupModule gr m2
- in [showIdent id ++ "\t" ++ "indir" ++ "\t" ++ showIdent m2 ++ "\t" ++ showIdent m1 ++ "\t" ++ gf2gftags opts (msrc mi)
- | id <- Map.keys (jments mi), filter incl id]
+ in [showIdent id ++ "\t" ++ "indir" ++ "\t" ++ showIdent m2 ++ "\t" ++ showIdent m1 ++ "\t" ++ gf2gftags opts (orig mi info)
+ | (id,info) <- Map.toList (jments mi), filter incl id]
filter MIAll id = True
filter (MIOnly ids) id = elem id ids
filter (MIExcept ids) id = not (elem id ids)
+ orig mi info =
+ case info of
+ AnyInd _ m0 -> let Ok mi0 = lookupModule gr m0
+ in msrc mi0
+ _ -> msrc mi
gftagsFile :: FilePath -> FilePath
gftagsFile f = addExtension f "gf-tags"