summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf/pgf.c
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2013-06-27 09:39:15 +0000
committerkr.angelov <kr.angelov@gmail.com>2013-06-27 09:39:15 +0000
commit155afdf9b76e37f4daed6d7d48dfd9e56844964f (patch)
tree81a0ea3cd21dd64cf147c36949235751268b1b87 /src/runtime/c/pgf/pgf.c
parentf4f76e46386e0888215eaf264e03e02a924dc7a7 (diff)
a complete Python API for reading, printing and manipulation of abstract trees and types. This includes dependent types, high-order abstract syntax and implicit arguments
Diffstat (limited to 'src/runtime/c/pgf/pgf.c')
-rw-r--r--src/runtime/c/pgf/pgf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/runtime/c/pgf/pgf.c b/src/runtime/c/pgf/pgf.c
index 13066927c..519dfea4a 100644
--- a/src/runtime/c/pgf/pgf.c
+++ b/src/runtime/c/pgf/pgf.c
@@ -178,6 +178,17 @@ pgf_iter_functions_by_cat(PgfPGF* pgf, PgfCId catname,
gu_map_iter(pgf->abstract.funs, &clo.fn, err);
}
+PgfType*
+pgf_function_type(PgfPGF* pgf, PgfCId funname)
+{
+ PgfAbsFun* absfun =
+ gu_map_get(pgf->abstract.funs, &funname, PgfAbsFun*);
+ if (absfun == NULL)
+ return NULL;
+
+ return absfun->type;
+}
+
GuString
pgf_print_name(PgfConcr* concr, PgfCId id)
{