We really need to get the type system to trap these sort of errors.