Fri Jan 18 22:08:11 PST 2008 alexander.dunlap@gmail.com
* GHC Trac 2050: Added bindings for read_history and write_history
diff -rN -u old-readline/System/Console/Readline.hsc new-readline/System/Console/Readline.hsc
|
old
|
new
|
|
| 41 | 41 | |
| 42 | 42 | readline, -- :: String -> IO (Maybe String) |
| 43 | 43 | addHistory, -- :: String -> IO () |
| | 44 | readHistory, -- :: String -> IO () |
| | 45 | writeHistory, -- :: String -> IO () |
| 44 | 46 | |
| 45 | 47 | -------------------------------------------------------------------- |
| 46 | 48 | -- Readline Variables. |
| … |
… |
|
| 333 | 335 | addHistory line = withCString line add_history |
| 334 | 336 | foreign import ccall unsafe add_history :: Ptr CChar -> IO () |
| 335 | 337 | |
| | 338 | readHistory :: FilePath -> IO () |
| | 339 | readHistory fp = withCString fp read_history |
| | 340 | foreign import ccall unsafe read_history :: Ptr CChar -> IO () |
| | 341 | |
| | 342 | writeHistory :: FilePath -> IO () |
| | 343 | writeHistory fp = withCString fp write_history |
| | 344 | foreign import ccall unsafe write_history :: Ptr CChar -> IO () |
| | 345 | |
| 336 | 346 | ------------------------------------------------------------------------ |
| 337 | 347 | -- Readline Variables. |
| 338 | 348 | |