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.zigans...@gmail.com

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to