darcs patch: Re: Readline readHistory & writeHistory API broken

On Wed, Jun 11, 2008 at 5:04 AM, Krasimir Angelov
Just fixing the comments is also fine for me. I personally use another file name.
On 6/11/08, Ian Lynagh
wrote: On Sun, Jun 08, 2008 at 05:30:34PM +0200, Krasimir Angelov wrote:
Note the comments "(if null, write ~/.history)"! This is supported in the original C API but in Haskell the filepath cannot be null. In the best case it can be empty string. Either the type signatures have to be changed to accept (Maybe FilePath) or the comments have to be changed because the Haskell binding currently doesn't support this functionality.
If writing to ~/.history is useful then Maybe FilePath makes sense to me, as ~/.history is a bit fiddly to work out yourself.
However, it doesn't sound that useful to me, as then all applications would trample over each other.
If you want to propose that it uses Maybe FilePath then you'll need to follow http://www.haskell.org/haskellwiki/Library_submissions; otherwise I'll just fix the comments.
I agree that just fixing the comments is fine.
Ian, it looks like the editline library also has this problem. Can
you please apply the attached patch (or its equivalent)?
Wed Jun 11 11:16:24 PDT 2008 Judah Jacobson

On Wed, Jun 11, 2008 at 11:26:14AM -0700, Judah Jacobson wrote:
I agree that just fixing the comments is fine.
Ian, it looks like the editline library also has this problem. Can you please apply the attached patch (or its equivalent)?
Thanks; it's in my repo now, so will be pushed next time I validate. Presumably you plan to also push it to the repo at http://code.haskell.org/editline ? I'd like to keep the GHC rep a subset of that one so that we don't have unnecessary conflicts etc. Thanks Ian

On Thu, Jun 12, 2008 at 7:32 AM, Ian Lynagh
On Wed, Jun 11, 2008 at 11:26:14AM -0700, Judah Jacobson wrote:
I agree that just fixing the comments is fine.
Ian, it looks like the editline library also has this problem. Can you please apply the attached patch (or its equivalent)?
Thanks; it's in my repo now, so will be pushed next time I validate. Presumably you plan to also push it to the repo at http://code.haskell.org/editline ? I'd like to keep the GHC rep a subset of that one so that we don't have unnecessary conflicts etc.
Sure; I was waiting for you to push to the GHC repo first, but your plan sounds fine. I've pushed the patch to code.haskell.org. -Judah
participants (2)
-
Ian Lynagh
-
Judah Jacobson