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}
12 Wrapper around the callback mechanism to allow Haskell side functions
13 to be callbacks for the Readline library.
15 The C function $genericRlCback$ puts the cback args into global
16 variables and enters the Haskell world through the $haskellRlEntry$
17 function. Before exiting, the Haskell function will deposit its result
18 in the global variable $rl_return$.
22 int current_narg, rl_return, current_kc;
26 StgStablePtr haskellRlEntry;
27 StgStablePtr cbackList;
30 int genericRlCback (int narg,int kc)
35 performIO(haskellRlEntry);