[darcs-users] darcs patch: Add Repository IO monad, RIO. (and 31 more)

Eric Kow kowey at darcs.net
Fri Sep 5 09:09:29 UTC 2008


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 :-(

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080905/f01a6293/attachment.pgp 


More information about the darcs-users mailing list