Visual Haskell's Hello, World

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Visual Haskell's Hello, World

Bill Mill-2
It seems trivial, but I think the contents of main.hs in the Visual Haskell
default project should include a getChar:

module Main where

main = do
        putStrLn "Hello, world!"
        getChar

The first thing a user is going to do on installation is hit the "build and
execute" button, and the default project displays a window which then closes
before the user can see if anything's happened.

-Bill Mill
bill.mill at gmail.com

_______________________________________________
Glasgow-haskell-bugs mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Reply | Threaded
Open this post in threaded view
|

Re: Visual Haskell's Hello, World

Neil Mitchell
Hi Bill,

> It seems trivial, but I think the contents of main.hs in the Visual Haskell
> default project should include a getChar:

Then people will wonder why their app has stopped, and get very confused.

A much better solution would be for GHC in Visual Studio to pause at
the end of a console application and give the user a "program
terminated, press any key to finish" message. Ideally at the end of
every program, not just for the sample one.

Thanks

Neil
_______________________________________________
Glasgow-haskell-bugs mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Reply | Threaded
Open this post in threaded view
|

Re: Visual Haskell's Hello, World

Esa Ilari Vuokko
In reply to this post by Bill Mill-2
Hi Bill,

On 1/2/07, Bill Mill <[hidden email]> wrote:

> It seems trivial, but I think the contents of main.hs in the Visual Haskell
> default project should include a getChar:
>
> module Main where
>
> main = do
>         putStrLn "Hello, world!"
>         getChar
>
> The first thing a user is going to do on installation is hit the "build and
> execute" button, and the default project displays a window which then closes
> before the user can see if anything's happened.

I don't have Visual Studio or Visual Haskell installed right now, but
I recall that for most languages there is two ways to run a program:
debug and non-debug.  For haskell these would be the same at the
moment.  But there's also another diffrence: non-debug leaves console
window open after running the program.  I think typical key bindings
are F5 for debug run, and Ctrl+F5 for non-debug.

Best regards,
Esa Ilari Vuokko
_______________________________________________
Glasgow-haskell-bugs mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs