
8 May
2012
8 May
'12
3:53 p.m.
Quoting Carlos López Camey
provide it to mkPrompt, instead of both the explicit completion and action functions, i.e. replace
mkXPrompt t conf compl action
with
mkXPrompt t conf myMode where myMode = XPMode { complFunction = .. action = .. }
I'm not sure I understand. Why is providing a data structure that stores two values better than supplying the two values? What can the internal code do with an XPMode that it couldn't do with a completion function and an action? (...and even if there is an answer to this, why can't the API wrap its two arguments in an XPMode before doing whatever it is it's doing?) ~d