
9 Apr
2010
9 Apr
'10
12:43 p.m.
Hello Haihua, Friday, April 9, 2010, 8:28:23 PM, you wrote:
In C++, template can be used to enforce the dimension. For example, F=m*a is OK and F=m*t will issue a compile time error.
Is there a way to do this in Haskell?
yes. but standard * operation has type t->t->t. so you need either to use other operation or don't import standard Num class -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com