Re: micro-rant

2001-08-08 Thread Richard Watson
On Wed, 8 Aug 2001, Wolfgang Jeltsch wrote: > I totally agree with Gary. In my opinion the unary minus is a anomaly in > Haskell which causes a lot of problems while beeing not that useful. For me > it is totally okay to use negate x instead of -x. > > Gary wrote: > > > > As long as were tryi

Re: Random Generator

2001-08-08 Thread Koen Claessen
Hannah Schroeter wrote: | * thread a random generator through randomPick, giving it the | type signature: | randomPick :: (RandomGen g) => g -> Int -> [a] -> ([a], g) It is not necessary to thread the random generator through. This is the reason why the "split" function exists in the Rand

Re: (no subject)

2001-08-08 Thread Hannah Schroeter
Hello! On Thu, Aug 09, 2001 at 12:10:12AM +1000, Vincent Tseng wrote: > hi > does anyone know how to do this ? > a function that will "randomly" takes elements from a list > eg randomPick 3 ['a','b','c','d','e'] = ['d','a','a'] Your example suggests a type signature like: randomPick :: Int -

(no subject)

2001-08-08 Thread Vincent Tseng
hi does anyone know how to do this ?   a function that will "randomly" takes elements from a list   eg randomPick 3 ['a','b','c','d','e'] = ['d','a','a']     thanks

Re: micro-rant

2001-08-08 Thread Wolfgang Jeltsch
Hello, I totally agree with Gary. In my opinion the unary minus is a anomaly in Haskell which causes a lot of problems while beeing not that useful. For me it is totally okay to use negate x instead of -x. Wolfgang Gary wrote: > Hello people, > I've been studying the Haskell 98 report as part

Thanks: Inferred type is not general enough

2001-08-08 Thread Cagdas Ozgenc
Thanks to all who responded.

Re: Inferred type is not general enough

2001-08-08 Thread Ketil Malde
"Cagdas Ozgenc" <[EMAIL PROTECTED]> writes: > The following function generates a type error. > > headColumnwise :: [a] -> a > headColumnwise line = [ head line | line <- p ] Surely, the parameter should be "p"? > ERROR ch6ex1.hs:14 - Inferred type is not general enough > *** Expression: he

Inferred type is not general enough

2001-08-08 Thread Cagdas Ozgenc
Hi, The following function generates a type error. headColumnwise :: [a] -> a headColumnwise line = [ head line | line <- p ] ERROR ch6ex1.hs:14 - Inferred type is not general enough *** Expression: headColumnwise *** Expected type : [a] -> a *** Inferred type : [[a]] -> [a] If I change th

Re: More feedback on Haskell 98 modules from the Programatica Team

2001-08-08 Thread Wolfgang Lux
Simon Peyton-Jones wrote > | 2) The semantics of "module M" style entries in export lists seems to > |Program 2: module A(module B, ...) where > |~~ import qualified B > | ... code that doesn't import B ... > | > |A similar example: now B appears as an impo