In Gtk2hs there is the Graphics.UI.Gtk.ModelView.CustomStore
module, which includes a data type containing a collection of functions, TreeModelIface
. It contains a bunch of functions for navigating around a user-defined tree type where the location is stored as aTreeIter
. So one of the member functions is:
treeModelIfaceIterNext :: TreeIter -> IO (Maybe TreeIter)
This returns the TreeIter
associated with the next sibling node, if there is one. Simple enough. But the following member function is:
treeModelIfaceIterChildren :: Maybe TreeIter -> IO (Maybe TreeIter)
This takes a Maybe TreeIter
instead of a simple TreeIter
. The documentation doesn't say why, or what an argument of Nothing
is used for.
Questions:
Why this variation of argument types?
What should
treeModelIfaceIterChilren iface Nothing
return?