Hi,

As an exercise I want to write a Matrix library.

Multiplication of two matrices is only defined when the the number of columns in the first matrix 
equals the number of rows in the second matrix. i.e. c1 == r2

So when writing the multiplication function I can check that  c1 == r2 and do something.
However what I really want to do, if possible, is to have the compiler catch the error. 

I’d appreciate any advice on how to approach this. I don’t want a full description of exactly what to do as that way I won’t have struggled  or argued with the compiler - which for me is the best way to learn Haskell :)


Thanks

Mike