Overloading functions in Haskell is done via the type class mechanism. If you add a data type and want it to have operations like "+" or "show" then you need to provide functions that conform to a complex hierarchy of classes (more info).
There's been a movement on the Haskell mailing lists to get this clarified and simplified. Unfortunately it seems to be falling on deaf/conservative ears.
Posted to functional by andrew cooke on 2/11/01; 3:06:28 AM
|