I think there may be a typo with the first example:
newtype ID a = ID Int deriving (Eq,Ord,Show)
Should possibly just be: newtype ID a = ID a deriving (Eq,Ord,Show)