Good point.

And there is another problem: one could expect
10 * [[1,2],[3,4]] to be equal to [[10,20],[30,40]]
and in this case 10 should be equal to [[10,0],[0,10]], instead of [[10,10],[10,10]] or [[10]].

I dont see how to fix this.
Could be better to forget about fromInteger...

Atila

Jared Updike wrote:
  fromInteger x = [[fromInteger x]]

Wouldn't you want the expression

[[1,0],[0,2]] + 10

to yield

[[11,10],[10,12]]

instead of [[11]] ? I guess you would need some complicated machinery
so this is one thing you have to ignore to keep your otherwise nifty
instance nice and simple.

 Jared.


                
_______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to