[Haskell-beginners] Restricting integers in a type?

Colin Paul Adams colin at colina.demon.co.uk
Sun Dec 28 04:07:08 EST 2008


Hello,

I want to declare a type thus:

type Coordinate = (Int, Int)

But the two integers must be confined to the inclusive range 0-11. Can
i express that in the type system?
-- 
Colin Adams
Preston Lancashire


More information about the Beginners mailing list