Hello,

I'm a beginner in Haskell, so forgive me if this is a basic question, but I'd like to know if it's possible to have a predicate as part of a data type, so that when the data type is created, it can only be done if it satisfies the predicate else a type error is thrown.

For instance, a matrix with integer elements could be modelled as [[Int]], given the restrictions that 
so that when a matrix is created, the type system wont allow it if the predicates aren't met.

Thanks,

Navid