-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On Sun, Dec 28, 2008 at 12:23 PM, Jean-Philippe Bernardy wrote: -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux)
iEYEAREKAAYFAklX6jAACgkQvpDo5Pfl1oIySwCgitq7vtsmqpge+x+5XxCidlou gQYAnAuLgMJPRx9YXRBCaEolhKFmL4VT =VqRX -----END PGP SIGNATURE----- > > On Sun, Dec 28, 2008 at 6:05 PM, Gwern Branwen <[email protected]> wrote: > >>> I just pushed a patch that implements this. Hopefully it is >>> self-explanatory. >>> Otherwise, I'd be happy to comment on it. >> >> I hope to look at it in more detail later, but at first glance I don't >> see any way to replace multiple symbols - ie. tokenToText is fine for >> symbols like '\' or '.' or '$', but it seems to operate a token at a >> time which renders unclear how to handle '&&' or '>>=' etc. > > && and >>= etc. are single tokens, so no problem. > > Cheers, > JP. No, no, I was referring to the argument. 'tokenToText (ReservedOp BackSlash) = Just "λ"' is fine as far as it goes, since BackSlash is defined a few lines up. But there don't seem to be datatypes/constructors for other entities like "&&". I thought Token(CharTok, StringTok) might be useful, but they don't look like 'CharTok Char' or 'StringTok String' like I would expect them to (so I can't pattern-match, say 'tokenToText (StringTok "/=") = Just "≠"'). -- gwern --~--~---------~--~----~------------~-------~--~----~ Yi development mailing list [email protected] http://groups.google.com/group/yi-devel -~----------~----~----~----~------~----~------~--~---
