Re: kinds for `*'

2012-01-11 Thread Brent Yorgey
On Tue, Jan 10, 2012 at 09:41:11PM +0400, Serge D. Mechveliani wrote:
> People,
> 
> GHC provides some extensions for kinds.
> Does this make possible different kinds, for example, for `*' ?

Terms have types, and types have kinds.  (*) is a term, so it has a
type, not a kind.

> Prelude.Num  has  * :: a -> a -> a.
> 
> And mathematicians also like to denote as `*' 
> (\cdot in TeX)
> a "multiplication of a vector v by a coefficient r". It is expressed by the 
> declaration
> 
>   class (Num r, ...) => LeftModule r v where  * :: r -> v -> v

It seems to me this is simply an issue of generalizing the definition
of (*).  Several attempts have been made in this direction, notably 
http://hackage.haskell.org/package/algebra and
http://hackage.haskell.org/package/numeric%2Dprelude.  But I am not
sure that the new extensions to the kind system have much to do with
this.

-Brent

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


kinds for `*'

2012-01-10 Thread Serge D. Mechveliani
People,

GHC provides some extensions for kinds.
Does this make possible different kinds, for example, for `*' ?

Prelude.Num  has  * :: a -> a -> a.

And mathematicians also like to denote as `*' 
(\cdot in TeX)
a "multiplication of a vector v by a coefficient r". It is expressed by the 
declaration

  class (Num r, ...) => LeftModule r v where  * :: r -> v -> v

Regards,

--
Sergei
mech...@botik.ru

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users