On 10/12/09, Martijn van Steenbergen <[email protected]> wrote: > Brandon S. Allbery KF8NH wrote: >> My fix would be to have myPrefixOf require the prefix be terminated in >> whatever way is appropriate (end of input, white space, operator?) >> instead of simply accepting as soon as it gets a prefix match regardless >> of what follows. > > Maybe you can use notFollowedBy for this. > > HTH, > > Martijn. > >
Yes, I've looked at that and am thinking about it. I'm not quite certain it's needed in my real program... I seem to have convinced myself that if I actually specify a proper set of unique prefixes, ie, set the required lengths for both "frito" and "fromage" to 3 in the test program, I won't get into this situation. Assuming I haven't committed another brain-fart there, that would be sufficient; presumably, in a real program one would want to actually specify the unique prefix, rather than a non-unique pre-prefix. It seems to work fine in my real program, anyway. Uwe _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
