To my request on Haskell-2
>> ...
>> class (Ring r,AddGroup (m r)) => RightModule m r
>> where
>> cMul :: m r -> r -> m r
>> -- "vector" (m r) multiplied by "coefficient" r'
>> ...
>> instance Ring r => RightModule r r where cMul = mul
>>
>> Haskell rejects this `=> RightModule r r'
Simon P. Jones <[EMAIL PROTECTED]> replies
> This is fine too (for Haskell 2). See the same URL.
(http://www.dcs.gla.ac.uk/~simonpj/multi-param.html)
I cannot find there the subject. Could you citate?
The matter is not in repeating variables r r but in that the type
variable r is set in the place of the constructor variable m.
This is to express the meaning instance...=> RightModule Id r
with
transparent_newtype Id a = a
------------------
Sergey Mechveliani
[EMAIL PROTECTED]