Following are the important built in
type classes.
Type
class
|
Description
|
Defines the function show, which
converts a value into a string, and other related functions.
|
|
Defines the function read, which
parses a string into a value of the type, and other related functions.
|
|
Equality operators == and /=
|
|
Comparison operators < <= >
>=; min, max, and compare.
|
|
Enum
|
For enumerations only. Allows the use
of list syntax such as [Blue .. Green].
|
Bounded
|
Also for enumerations, but can also be
used on types that have only one constructor. Provides minBound and maxBound
as the lowest and highest values that the type can take.
|
No comments:
Post a Comment