summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/GF/Compile')
-rw-r--r--src/compiler/GF/Compile/Rename.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compiler/GF/Compile/Rename.hs b/src/compiler/GF/Compile/Rename.hs
index 5329a45aa..c8bf8cdd9 100644
--- a/src/compiler/GF/Compile/Rename.hs
+++ b/src/compiler/GF/Compile/Rename.hs
@@ -24,6 +24,7 @@
module GF.Compile.Rename (
renameSourceTerm,
+ renameSourceJudgement,
renameModule
) where
@@ -50,6 +51,14 @@ renameSourceTerm g m t = do
status <- buildStatus g m mo
renameTerm status [] t
+-- | this gives top-level access to renaming term input in the cj command
+renameSourceJudgement :: SourceGrammar -> Ident -> (Ident,Info) -> Check (Ident,Info)
+renameSourceJudgement g m (i,t) = do
+ mo <- checkErr $ lookupModule g m
+ status <- buildStatus g m mo
+ t2 <- renameInfo status m i t
+ return (i,t2)
+
renameModule :: [SourceModule] -> SourceModule -> Check SourceModule
renameModule ms (name,mo) = checkIn (text "renaming module" <+> ppIdent name) $ do
let js1 = jments mo