diff options
Diffstat (limited to 'src/compiler/GF/Compile/Coding.hs')
| -rw-r--r-- | src/compiler/GF/Compile/Coding.hs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/compiler/GF/Compile/Coding.hs b/src/compiler/GF/Compile/Coding.hs index 49538bd35..b909aac7d 100644 --- a/src/compiler/GF/Compile/Coding.hs +++ b/src/compiler/GF/Compile/Coding.hs @@ -25,13 +25,15 @@ codeSourceModule co (id,mo) = (id,replaceJudgements mo (mapTree codj (jments mo) CncFun mty pt mpr -> CncFun mty (fmap (codeTerm co) pt) (fmap (codeTerm co) mpr) _ -> info -codeTerm :: (String -> String) -> Term -> Term -codeTerm co t = case t of +codeTerm :: (String -> String) -> L Term -> L Term +codeTerm co (L loc t) = L loc (codt t) + where + codt t = case t of K s -> K (co s) - T ty cs -> T ty [(codp p,codeTerm co v) | (p,v) <- cs] + T ty cs -> T ty [(codp p,codt v) | (p,v) <- cs] EPatt p -> EPatt (codp p) - _ -> composSafeOp (codeTerm co) t - where + _ -> composSafeOp codt t + codp p = case p of --- really: composOpPatt PR rs -> PR [(l,codp p) | (l,p) <- rs] PString s -> PString (co s) |
