[darcs-users] Recommendations for implementation of issue #291

Eric Kow kowey at darcs.net
Sat Jan 17 14:08:04 UTC 2009


Hi Rob,

On Sat, Jan 10, 2009 at 23:44:59 -0600, Rob Hoelz wrote:
> 1. Thread a function of type (Patchy p) => p C(x y) -> Maybe Int
> through to tentatively_text_select.  It should return Nothing if the
> argument is not a hunk, or Just lineNumber if it is.  Here's my sample
> implementation:

> 2. Define a get_line_number operation for Patchy or one of its
> superclasses. (it should have a similar type and behavior to the example
> given above)

> Which implementation would you other developers prefer?  I don't care
> for #1 much, mainly because we have to thread that extra function
> through.  However, #2 isn't very good either, because we're defining a
> class operation that doesn't make sense for most instances.  What do
> you all think?

Hmm... I guess I would guess that #1 is better than #2 (for the reason
you describe).  The threading may be icky, but at least it's localised
to where it makes sense.  What did you settle on?

-- 
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: 197 bytes
Desc: Digital signature
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20090117/efaa5927/attachment.pgp 


More information about the darcs-users mailing list