Adde wrote:
signatureEntry <- xmlGetWidget xml castToEntry "signatureEntry" passwordEntry <- xmlGetWidget xml castToEntry "passwordEntry" repeatEntry <- xmlGetWidget xml castToEntry "repeatEntry" return UserPanel {userPanelSignatureEntry = signatureEntry, userPanelPasswordEntry = passwordEntry, userPanelRepeatEntry = repeatEntry}
Use one of the general monadic combinators given in Control.Monad: liftM3 UserPanel (xmlGetWidget xml castToEntry "signatureEntry") (xmlGetWidget xml castToEntry "passwordEntry") (xmlGetWidget xml castToEntry "repeatEntry") or return UserPanel `ap` xmlGetWidget xml castToEntry "signatureEntry" `ap` xmlGetWidget xml castToEntry "passwordEntry" `ap` xmlGetWidget xml castToEntry "repeatEntry" Tillmann _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe