On Fri, Sep 5, 2008 at 5:09 AM, Eric Kow <[EMAIL PROTECTED]> wrote:
> On Thu, Sep 04, 2008 at 11:07:25 -0700, Jason Dagit wrote:
>> >> +  withRepository [] $ do
>> >> +    r <- getRepository
>> >> +    s <- rIO $ slurp_pending r
>> >> +    return $ (map drop_dotslash . list_slurpy) s
>> >
>> > I wonder if something like a withRepositoryRIO could have helped us
>> > here, and in the rest of the code.  Oh well :-)
>>
>> What is withRepositoryRIO?
>
> I'm sorry.  I had hallucinated some kind of re-arrangement of things, so
> higher order function which would let pass a repository to an IO action
> via rIO.  But now I can't work out quite what I meant.  Maybe something
> like
>
>  thingy job = withRepository [] (getRepository >>= rIO . job)
>
> But now it doesn't seem like it would be all that helpful :-(

Actually, that was the transition that I was envisioning, to leave all
the Commands code (and withRepository) untouched, and introduce a new
way of doing things that allows type witnesses.  Then we could
gradually convert code over to use RIO (and support type witnesses
correctly at the same time).

David
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to