Guru Devanla
2018-11-06 16:35:56 UTC
Hello Haskell-Cafe,
I have been recently studying the XMonad code and some related types
available in the X11 bindings library.
I came across this type:
newtype XEvent = XEvent XEventPtr
type XEventPtr = Ptr
<http://hackage.haskell.org/package/base-4.10.1.0/docs/Foreign-Ptr.html#t:Ptr>
XEvent
<http://hackage.haskell.org/package/X11-1.9/docs/Graphics-X11-Xlib-Event.html#t:XEvent>
Available here:
http://hackage.haskell.org/package/X11-1.9/docs/Graphics-X11-Xlib-Event.html#t:XEvent
It seems that this type is circular here. how does one use this type? Is it
possible to create a value out of this type? What is the use of this type?
Please could someone help me wrap my head around this?
Thanks
I have been recently studying the XMonad code and some related types
available in the X11 bindings library.
I came across this type:
newtype XEvent = XEvent XEventPtr
type XEventPtr = Ptr
<http://hackage.haskell.org/package/base-4.10.1.0/docs/Foreign-Ptr.html#t:Ptr>
XEvent
<http://hackage.haskell.org/package/X11-1.9/docs/Graphics-X11-Xlib-Event.html#t:XEvent>
Available here:
http://hackage.haskell.org/package/X11-1.9/docs/Graphics-X11-Xlib-Event.html#t:XEvent
It seems that this type is circular here. how does one use this type? Is it
possible to create a value out of this type? What is the use of this type?
Please could someone help me wrap my head around this?
Thanks