1
0
forked from GitHub/gf-core

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

This commit is contained in:
kr.angelov
2013-06-27 09:39:15 +00:00
parent f4f76e4638
commit 155afdf9b7
9 changed files with 1148 additions and 81 deletions

View File

@@ -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)
{