I have heard a good deal about how powerful type systems can help you model your domain and its constraints effectively. I am looking for a good resource on this topic, similar to how there exist books about Entity-Relationship modeling, or object oriented design. Do you know of any?