kinds for `*'
Brent Yorgey
byorgey at seas.upenn.edu
Wed Jan 11 15:23:59 CET 2012
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
More information about the Glasgow-haskell-users
mailing list