[Haskell] The meaning of #{}

Rob Hoelz hoelz at wisc.edu
Tue Feb 13 01:40:00 EST 2007


I've been pouring over the Xlib bindings for Haskell, and I've come
across the following code:

peekXButtonEvent p = do
        root            <- #{peek XButtonEvent,root} p
        subwindow       <- #{peek XButtonEvent,subwindow} p
        time            <- #{peek XButtonEvent,time} p
        x               <- #{peek XButtonEvent,x} p
        y               <- #{peek XButtonEvent,y} p
        x_root          <- #{peek XButtonEvent,x_root} p
        y_root          <- #{peek XButtonEvent,y_root} p
        state           <- #{peek XButtonEvent,state} p
        button          <- #{peek XButtonEvent,button} p
        same_screen     <- #{peek XButtonEvent,same_screen} p
        return (root, subwindow, time, x, y, x_root, y_root,
                state, button, same_screen)

I can't seem to find a definition or an explanation for #{}.  Is this
some kind of operator for dealing with monads or something?

Thanks,
Rob Hoelz


More information about the Haskell mailing list