Commit 015640da authored by Marc Coiffier's avatar Marc Coiffier
Browse files

Use the safer Foreign.Concurrent.ForeignPtr with the GTK bindings in definitive-graphics

parent cf2e953c
......@@ -22,7 +22,8 @@ module Graphics.Widget.Traits(
import Definitive
import Foreign.Ptr
import Foreign.ForeignPtr
import Foreign.ForeignPtr hiding (newForeignPtr)
import Foreign.Concurrent
import IO.Time (Seconds)
import Graphics.GDK.KeyCodes
import IO.Dynamic
......@@ -38,8 +39,7 @@ data WProps a = WProps {
_wPropsValue :: a
nullWidgetPtr = thunk $^ do
cb <- callback_p_ (const unit)
newForeignPtr cb nullPtr
newForeignPtr nullPtr unit
instance Functor WProps where map f (WProps h a) = WProps h (f a)
instance Unit WProps where pure x = WProps nullWidgetPtr x
instance SemiApplicative WProps where WProps h f <*> WProps h' x = WProps (max h h') (f x)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment