O'Reilly logo

The Haskell School of Expression by Paul Hudak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER TWENTY-FOUR

A Tour of Haskell’s Standard Type Classes

 

 

 

 

 

In this chapter I will give you a “tour” through the predefined standard type classes in Haskell, as I did for lists in Chapter 23. These classes have been simplified somewhat by omitting some of the less interesting methods. The Haskell Report and Standard Library Report contain more complete descriptions.

24.1 The Ordered Class

The equality class Eq was defined precisely in Chapter 12, along with a simplified version of the class Ord. Here is its full specification of class Ord; note the many default methods:

images

Note that the default method for compare is defined in terms ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required