Q:

Can I easily make my tuple type synonym an instance of Read?

I have a type synonym declared for the tuple of two Ints:
type Coordinate = (Int, Int)

I'd like to read in Coordinates as part of an IO Action, which boils down to using the read function.  Is there a way to leverage the existing Read instance of Tuples to accomplish this?

A:

Have you just tried it?
The answer is: yes, the tuple instance is used, there's no need to do anything at all yourself because Coordinate isn't even a different type – it's just a “hard link” to the same type (Int,Int), with all the same functions and class instances.

A:

type Coordinate = (Int, Int)
home = read "(1,2)" :: Coordinate
school = read "(10,4)" :: Coordinate

