From 155afdf9b76e37f4daed6d7d48dfd9e56844964f Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Thu, 27 Jun 2013 09:39:15 +0000 Subject: 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 --- src/runtime/c/pgf/pgf.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/runtime/c/pgf/pgf.c') 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) { -- cgit v1.2.3