Michael Vanier wrote: >> Is there an implementation of a symbol type in Haskell i.e. a string which >> has a constant-time comparison operation?
Stefan O'Rear wrote: > Yes, I beleive GHC uses one (utils/FastString.lhs iirs) In some cases where you would need that in other languages, you would use an algebraic data type in Haskell, e.g.: data Color = Red | Orange | Yellow | Green | Blue | Purple deriving (Eq, Show) -Yitz _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe