[Haskell-beginners] main

Keith Sheppard keithshep at gmail.com
Sat Oct 3 15:36:32 EDT 2009


Hello, if you enter ":h" at the prompt it gives all of the available
ghci commands. I think this is the one you're looking for

:main [<arguments> ...]     run the main function with the given arguments

-Keith

On Sat, Oct 3, 2009 at 3:07 PM, John Moore <john.moore54 at gmail.com> wrote:
> Hi,
>     I must be doing something wrong when I run a program it comes up on the
> screen as OK module loaded Main
> *Main>
> But it will not do what I program to do. What do I enter after *main> I
> tried putting in the arguments but ot just returns the arguments.
>
> For example:
>
> signum x | x < 0 = -1
>           | x == 0 = 0
>               | x > 0 = 1
>
> Enter 5 it returns 5
>
> What have I missed?
>
> Regards
>
> John
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>



-- 
keithsheppard.name


More information about the Beginners mailing list