summaryrefslogtreecommitdiff
path: root/src/runtime/haskell-bind/PGF2
diff options
context:
space:
mode:
authorkrangelov <kr.angelov@gmail.com>2019-05-28 12:26:00 +0200
committerkrangelov <kr.angelov@gmail.com>2019-05-28 12:26:00 +0200
commit9f0ea19a1ca7eba160746bdc91c55f7ae4c0b4fc (patch)
treedc83a64b3e77404431bbe4573a235d513ec32ee0 /src/runtime/haskell-bind/PGF2
parent8df212165028242458795b1f943c7975eb434e2a (diff)
API for scanning for cohorts in an arbitrary text
Diffstat (limited to 'src/runtime/haskell-bind/PGF2')
-rw-r--r--src/runtime/haskell-bind/PGF2/FFI.hsc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/runtime/haskell-bind/PGF2/FFI.hsc b/src/runtime/haskell-bind/PGF2/FFI.hsc
index 39b18fcf3..713adcecc 100644
--- a/src/runtime/haskell-bind/PGF2/FFI.hsc
+++ b/src/runtime/haskell-bind/PGF2/FFI.hsc
@@ -100,7 +100,7 @@ foreign import ccall unsafe "gu/string.h gu_string_buf_out"
foreign import ccall unsafe "gu/file.h gu_file_in"
gu_file_in :: Ptr () -> Ptr GuPool -> IO (Ptr GuIn)
-foreign import ccall unsafe "gu/enum.h gu_enum_next"
+foreign import ccall safe "gu/enum.h gu_enum_next"
gu_enum_next :: Ptr a -> Ptr (Ptr b) -> Ptr GuPool -> IO ()
foreign import ccall unsafe "gu/string.h gu_string_buf_freeze"
@@ -401,6 +401,9 @@ foreign import ccall "pgf/pgf.h pgf_parse_with_oracle"
foreign import ccall "pgf/pgf.h pgf_lookup_morpho"
pgf_lookup_morpho :: Ptr PgfConcr -> CString -> Ptr PgfMorphoCallback -> Ptr GuExn -> IO ()
+foreign import ccall "pgf/pgf.h pgf_lookup_cohorts"
+ pgf_lookup_cohorts :: Ptr PgfConcr -> CString -> Ptr PgfMorphoCallback -> Ptr GuPool -> Ptr GuExn -> IO (Ptr GuEnum)
+
type LookupMorphoCallback = Ptr PgfMorphoCallback -> CString -> CString -> Float -> Ptr GuExn -> IO ()
foreign import ccall "wrapper"