Readline read_history and write_history addition

Judah Jacobson judah.jacobson at gmail.com
Wed Feb 20 20:31:06 EST 2008


Hi all,

Discussion over this issue has died down.  Yitzchak and others have
made good arguments for the type signatures

readHistory :: String -> IO Bool
writeHistory :: String -> IO Bool

which reflect the non-exceptional nature of failure of those functions.

Does anyone have any problems with implementing the following patch
from Alex (along with the above change)?
http://www.haskell.org/pipermail/libraries/2008-January/009007.html

For reference, this is in relation to the following proposal:
http://hackage.haskell.org/trac/ghc/ticket/2053

If no objections are raised by next week (say, Feb. 27), we should
make the above changes to readline, which will let us implement #2050
(persistent history file in ghci).

Thanks,
-Judah


On Wed, Feb 6, 2008 at 1:09 PM, Yitzchak Gale <gale at sefer.org> wrote:
> Judah Jacobson wrote:
>  > - readFile... writeFile...
>
> > I think of readHistory and writeHistory as analogues to the above
>  > functions.
>
>  I don't think so. I don't really care about the file itself - that
>  just happens to be the way readline implements its persistence.
>  Non-existence of the file is the normal way that readline
>  represents the fact that there isn't any history yet.
>  The semantics of the API call are: load history, if any exists yet,
>  and report the result. Nothing exceptional about that.
>
>
>  > All that being said, this is a relatively minor issue
>
>  Agreed. All the more so with the MonadIO problem now factored
>  out.
>
>  Regards,
>  Yitz
>


More information about the Libraries mailing list