[Haskell-cafe] Network of GUI Controls - using MonadFix?

Felipe Lessa felipe.lessa at gmail.com
Wed Jun 23 21:00:55 EDT 2010

On Thu, Jun 24, 2010 at 02:35:55AM +0200, Günther Schmidt wrote:
> Is that something that MonadFix is meant to be used for?

In current Gtk libraries, no.  You'll do something like

  do btns <- mapM createBtn [1..4]
     mapM_ connect $ zip btns (tail $ cycle btns)

However, if some library required you to supply the action while
constructing the button, then I guess the answer would be "yes".



More information about the Haskell-Cafe mailing list