Hi Jason,
Op zondag 10 januari 2010 02:47 schreef Jason Dagit:
> That leads to a function like this:
> \begin{code}
> readHunkHandle :: HunkHandle -> IO HunkContent
> \end{code}
>
> I've made this change all throughout the code base and inserted comments and
> undefined everywhere that I didn't know how to make an immediate fix. I'm
> going through and trying to fix those less obvious places. In the Apply
> class we use WriteableDirectory m instead of directly using IO in the
> types. This makes me think that readHunkHandle should have type:
> \begin{code}
> readHunkHandle :: WriteableDirectory m => HunkHandle -> m HunkContent
> \end{code}
>
> Does this look right to anyone else? Since WriteableDirectory has an
> instance for IO, I think the first type would work but maybe if I use IO
> directly I'm violating some design principle here?It looks like you have to use IO directly. Just from grepping the source tree, it looks like the WriteableDirectory class is used for the IO monad and the monads of slurpies and hashed storage. In this case, however, the IO in the type stands for the IO necessary to read the hunk contents from the patch file, which I think is not supposed to be done using slurpies or hashed storage. Reinier
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
