summaryrefslogtreecommitdiff
path: root/src/GF/Grammar
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Grammar')
-rw-r--r--src/GF/Grammar/Macros.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/GF/Grammar/Macros.hs b/src/GF/Grammar/Macros.hs
index e6906f985..2edb183a1 100644
--- a/src/GF/Grammar/Macros.hs
+++ b/src/GF/Grammar/Macros.hs
@@ -135,6 +135,11 @@ termForm t = case t of
_ ->
return ([],t,[])
+termFormCnc :: Term -> ([(Ident)], Term)
+termFormCnc t = case t of
+ Abs x b -> (x:xs, t') where (xs,t') = termFormCnc b
+ _ -> ([],t)
+
appForm :: Term -> (Term, [Term])
appForm t = case t of
App c a -> (fun, args ++ [a]) where (fun, args) = appForm c