Two things that i still can't understand in Haskell standard

2006-10-14 Thread Bulat Ziganshin
Hello haskell-prime, first is the monomorphism restriction. why isn't it possible to check _kind_ of parameter-less equation and apply monomorphism restrictions only to values of kind '*'? so, this: sum = foldr1 (*) will become polymorphic because its kind is '*-*' while this exps = 1 : map

Re: Two things that i still can't understand in Haskell standard

2006-10-14 Thread Lennart Augustsson
You don't mean checking kind, but checking type. The same argument that can be made for the monomorphism restriction at base type can be used for function types too. There is nothing impossible about prefixpostfix operator. Haskell just happens not to have them. They could be added.