summaryrefslogtreecommitdiff
path: root/src/runtime/haskell-bind/PGF2/FFI.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2017-02-10 17:10:37 +0000
committerkrasimir <krasimir@chalmers.se>2017-02-10 17:10:37 +0000
commit94f41cc63dfc0a55d8957762500eb93f2331e1da (patch)
tree5f73bdf28c19bd41e8bda6959da3b9f17383cdfb /src/runtime/haskell-bind/PGF2/FFI.hs
parentd0f7f9ca8dcc085fcc4061ecd954c283e2d823e3 (diff)
safer memory management in the Haskell binding
Diffstat (limited to 'src/runtime/haskell-bind/PGF2/FFI.hs')
-rw-r--r--src/runtime/haskell-bind/PGF2/FFI.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/runtime/haskell-bind/PGF2/FFI.hs b/src/runtime/haskell-bind/PGF2/FFI.hs
index 35aa7fa84..d2b5d5365 100644
--- a/src/runtime/haskell-bind/PGF2/FFI.hs
+++ b/src/runtime/haskell-bind/PGF2/FFI.hs
@@ -10,10 +10,12 @@ import Control.Exception
import GHC.Ptr
import Data.Int(Int32)
+type Touch = IO ()
+
-- | An abstract data type representing multilingual grammar
-- in Portable Grammar Format.
-data PGF = PGF {pgf :: Ptr PgfPGF, pgfMaster :: ForeignPtr GuPool}
-data Concr = Concr {concr :: Ptr PgfConcr, concrMaster :: PGF}
+data PGF = PGF {pgf :: Ptr PgfPGF, touchPGF :: Touch}
+data Concr = Concr {concr :: Ptr PgfConcr, touchConcr :: Touch}
------------------------------------------------------------------
-- libgu API