Re: [Haskell-cafe] What are Kind errors and how do you fix them?

2004-03-24 Thread MR K P SCHUPKE
I dont understand what you are trying to do: type ReverseType a string = (string -(string,a)) takes a string an returns a string and another value (looks like the state monad with state=String. data Reverse a string = Reverse (ReverseType a string) this just declares a type

Re: [Haskell-cafe] What are Kind errors and how do you fix them?

2004-03-24 Thread MR K P SCHUPKE
Erm... okay my mistake thats not the problem... although it is to with state... When decaring a monad the return type is included in the class definition (it is a constructor class) This means the return value MUST be the last parameter to the type, so you need: type ReverseType a string =

[Haskell-cafe] loop in C , recursion in haskell

2004-03-24 Thread Alex Gontcharov
Hi, I am new to haskell and would look to write a function equivalent to the following loop in C int value = 50; int part_stack[4]; int *part_ptr = part_stack; for (; value; value /= 1) *part_ptr++ = value % 1; Thanks ___

Re: [Haskell-cafe] loop in C , recursion in haskell

2004-03-24 Thread David Roundy
On Thu, Mar 25, 2004 at 01:38:44AM +1100, Alex Gontcharov wrote: Hi, I am new to haskell and would look to write a function equivalent to the following loop in C int value = 50; int part_stack[4]; int *part_ptr = part_stack; for (; value; value /= 1) *part_ptr++ = value %

RE: [Haskell-cafe] loop in C , recursion in haskell

2004-03-24 Thread Stefan Holdermans
Alex, AG I am new to haskell and would look to write a function AG equivalent to the following loop in C AG int value = 50; AG int part_stack[4]; AG int *part_ptr = part_stack; AG for (; value; value /= 1) AG *part_ptr++ = value % 1; What about this? part :: Int - Int -

RE: [Haskell-cafe] loop in C , recursion in haskell

2004-03-24 Thread Duncan Coutts
On Wed, 2004-03-24 at 15:51, Simon Marlow wrote: I am new to haskell and would look to write a function equivalent to the following loop in C int value = 50; int part_stack[4]; int *part_ptr = part_stack; for (; value; value /= 1) *part_ptr++ = value % 1;

[Haskell-cafe] Where's the error in this snippet of code?

2004-03-24 Thread Alex Gontcharov
Ignore the layout I can't find the error, running it gives parse error during compile on pStack, it is not very descriptive and I don't what is wrong. --Stack for the digits for numbers, a modulo b digStack :: Integer-Integer-[Integer] digStack a b | a == 0 = [] | otherwise =

Re: [Haskell-cafe] Where's the error in this snippet of code?

2004-03-24 Thread Christian Maeder
Alex Gontcharov wrote: Ignore the layout pStack needs to be indented to the same level than digStack (or a where must be inserted after digStack). I can't find the error, running it gives parse error during compile on pStack, it is not very descriptive and I don't what is wrong. after correct

[Haskell-cafe] Implementing C program in Haskell

2004-03-24 Thread Alex Gontcharov
Hi, Is anyone bored and wants to rewrite a small C program in Haskell?:) http://users.tpg.com.au/galutva/jap.c I am new to Haskell and it'd take me sometime to do it all myself. Thanks ___ Haskell-Cafe mailing list [EMAIL PROTECTED]

RE: [Haskell-cafe] Where's the error in this snippet of code?

2004-03-24 Thread Stefan Holdermans
Alex, AG Ignore the layout AG I can't find the error, running it gives parse error during AG compile on pStack, it is not very descriptive and I don't AG what is wrong. Well, ignoring the layout is not a good thing here, since that's the one of the causes for your program to not

Re: [Haskell-cafe] Where's the error in this snippet of code?

2004-03-24 Thread Tom Pledger
Stefan Holdermans wrote: Alex, AG Ignore the layout AG I can't find the error, running it gives parse error during AG compile on pStack, it is not very descriptive and I don't AG what is wrong. Well, ignoring the layout is not a good thing here, since that's the one of the causes for your

[Haskell-cafe] HToolkit HSQL on Windows/GHC

2004-03-24 Thread Clive Brettingham-Moore
I realise that this is a little technical for this list, but I thought that I'd check here before starting on the hard-core lists. Is there an easy way to build the HToolkit HSQL library for GHC (6.0.1 when I tried, 6.2.1 now) on windows (particularly MySQL/Windows XP, but I wont say no to