[darcs-users] darcs patch: Haddock some simple functions in Darcs.P... (and 2 more)

Eric Kow kowey at darcs.net
Wed Apr 29 21:17:45 UTC 2009


On Wed, Apr 29, 2009 at 14:11:40 -0700, Jason Dagit wrote:
> >> >+    --   Consider the commute square with patch names written in capital
> >> > letters and
> >> >+    --   patch contexts written in small letters.
> >> >+    --
> >> >+    --   @
> >> >+    --          X
> >> >+    --       o-----a
> >> >+    --       |     |
> >> >+    --    Y' |     | Y
> >> >+    --       |     |
> >> >+    --       z-----b
> >> >+    --          X'
> >> >+    --   @

...

> >> >+    --   @
> >> >+    --         -X     X
> >> >+    --       a-----o-----a
> >> >+    --       |     |     |
> >> >+    --   Y'' |   Y'|     | Y
> >> >+    --       |     |     |
> >> >+    --       b-----z-----b
> >> >+    --         (-X)'  X'
> >> >+    --   @

> Each context corresponds to exactly one specific state[1].  Each state
> could be generated by any number of contexts.  That is, there is a
> *function* from context to state, but the converse, state to context
> is not a function.  State does not uniquely determine the context.
> Some contexts (sequences of patches) are not identical, but generate
> the same state.  If the contexts are related by commutation of their
> sequences then they are equivalent contexts (and also generate the
> same state).

Yeah, this was the distinction I was worried that my Haddock was
stumbling over.  I think to fix it, I should say that the state
is written in small letters and not the context because the two
a states in the top corners have different contexts.  Also I
should probably add little arrows

@
      -X     X
    a--->-o--->-a
    |     |     |
Y'' |  Y' |     | Y
    V     V     V 
    b--->-z--->-b
      (-X)'  X'
@

Overall, I hope this idea of using ASCII art in the Haddocks to help
with visual reasoning is a good thing to do and not short-sighted in
some way...

-- 
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/20090429/3aecab13/attachment.pgp>


More information about the darcs-users mailing list