KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Possible Duplicate: How to make a type with restrictions Is it possible in Haskell to create a type for example "Name" which is a String but containing no more then 10 letters? If not how can I forbid to create a Person with to long name (where Person is defined like that: data Person = Person Name ). Maybe it is not important at all, maybe that kind of problems should be solved in Haskell in a different way?
Tags (comma-separated)
Save Edits
Cancel