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

2004-03-25 Thread Duncan Coutts
On Wed, 2004-03-24 at 18:00, Alex Gontcharov wrote: > I don't want to hide it within the function, I need the functions > to have file scope. Oh, ok. I assumed from the indentation (you see layout matters!) that it was a nested function. Haskell (like Python) is layout sensitive, the indentation

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 y

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 com

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 i

[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 =