an unsafe API for adding functions to the grammar. breaks referential transparency

This commit is contained in:
krangelov
2021-09-04 07:10:04 +02:00
parent 55d30d70f5
commit 9a2d2b345d
4 changed files with 44 additions and 0 deletions

View File

@@ -101,6 +101,10 @@ foreign import ccall "pgf/expr.h pgf_function_is_constructor"
foreign import ccall "pgf/expr.h pgf_function_is_constructor"
pgf_function_prob :: Ptr PgfPGF -> Ptr PgfText -> IO (#type prob_t)
foreign import ccall "pgf_create_function"
pgf_create_function :: Ptr PgfPGF -> Ptr PgfText -> StablePtr Type -> (#type prob_t) -> Ptr PgfMarshaller -> IO ()
-----------------------------------------------------------------------
-- Texts