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
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 =
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
___
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 %
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 -
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;
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 =
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
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]
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
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
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
12 matches
Mail list logo