2 % (c) The GRASP/AQUA Project, Glasgow University, 1995
4 % Last Modified: Wed Jul 19 12:03:26 1995
5 % Darren J Moffat <moffatd@dcs.gla.ac.uk>
6 \section[LibReadline]{GNU Readline Library Bindings}
11 #include "ghcReadline.h" /* to make sure the code here agrees...*/
14 Wrapper around the callback mechanism to allow Haskell side functions
15 to be callbacks for the Readline library.
17 The C function $genericRlCback$ puts the cback args into global
18 variables and enters the Haskell world through the $haskellRlEntry$
19 function. Before exiting, the Haskell function will deposit its result
20 in the global variable $rl_return$.
23 I_ current_narg, rl_return, current_kc;
27 StgStablePtr haskellRlEntry;
28 StgStablePtr cbackList;
32 genericRlCback (I_ narg, I_ kc)
37 performIO(haskellRlEntry);