End,
There most definatly is a compression load caused by the halyard but as Ian points out it is pretty minimal compared to shroud loads, and masts are designed (even the bendy ones) with this halyard tension in mind. So for the vast majority of sailors there is no issue.
That being said, in very high end long distance racing boats (Open 60's, Maxi Trans-Pac boats, ect...) boats will replace the halyard with either a strap, or special hardware that holds the sail up. This not only reduced compression loads, it also prevents halyard chaff, and reduces weight aloft. But these pieces of hardware are completely unecessary for the average sailor (even the average long distance racer).
Take a look at
http://www.southernspars.com/souther...uildpage&p=446 for a primer on the systems.