diff options
| author | krasimir <krasimir@chalmers.se> | 2017-01-26 14:09:07 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2017-01-26 14:09:07 +0000 |
| commit | af1a581f40a8a1fb7da66eb69fc43280650f1042 (patch) | |
| tree | 4dd16c2913ae7600443b50448cb3717a650186e2 /src/runtime/haskell-bind/PGF2 | |
| parent | 24671a612cf044824104cbf64faab0ded6a8579d (diff) | |
type checking API in the Haskell binding
Diffstat (limited to 'src/runtime/haskell-bind/PGF2')
| -rw-r--r-- | src/runtime/haskell-bind/PGF2/FFI.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/runtime/haskell-bind/PGF2/FFI.hs b/src/runtime/haskell-bind/PGF2/FFI.hs index 949c46471..5ae2ced06 100644 --- a/src/runtime/haskell-bind/PGF2/FFI.hs +++ b/src/runtime/haskell-bind/PGF2/FFI.hs @@ -61,6 +61,8 @@ gu_exn_type_PgfExn = Ptr "PgfExn"# :: CString gu_exn_type_PgfParseError = Ptr "PgfParseError"# :: CString +gu_exn_type_PgfTypeError = Ptr "PgfTypeError"# :: CString + foreign import ccall "gu/string.h gu_string_in" gu_string_in :: CString -> Ptr GuPool -> IO (Ptr GuIn) @@ -290,6 +292,16 @@ foreign import ccall "pgf/pgf.h pgf_expr_unlit" foreign import ccall "pgf/expr.h pgf_expr_arity" pgf_expr_arity :: PgfExpr -> IO CInt +foreign import ccall "pgf/expr.h pgf_check_expr" + pgf_check_expr :: Ptr PgfPGF -> Ptr PgfExpr -> PgfType -> Ptr GuExn -> Ptr GuPool -> IO () + +foreign import ccall "pgf/expr.h pgf_infer_expr" + pgf_infer_expr :: Ptr PgfPGF -> Ptr PgfExpr -> Ptr GuExn -> Ptr GuPool -> IO PgfType + +foreign import ccall "pgf/expr.h pgf_check_type" + pgf_check_type :: Ptr PgfPGF -> Ptr PgfType -> Ptr GuExn -> Ptr GuPool -> IO () + + foreign import ccall "pgf/expr.h pgf_print_expr" pgf_print_expr :: PgfExpr -> Ptr PgfPrintContext -> CInt -> Ptr GuOut -> Ptr GuExn -> IO () |
