RE: [Haskell-cafe] How can I stop GHCi from calling "show" for IO actions?

2007-09-18 Thread Simon Peyton-Jones
| -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sam | Hughes | Sent: 16 September 2007 04:53 | To: Ryan Ingram | Cc: haskell-cafe | Subject: Re: [Haskell-cafe] How can I stop GHCi from calling "show" for IO actions? | | Ryan In

Re: [Haskell-cafe] How can I stop GHCi from calling "show" for IO actions?

2007-09-17 Thread Ryan Ingram
On 9/17/07, Henning Thielemann <[EMAIL PROTECTED]> wrote: > On Sat, 15 Sep 2007, Sam Hughes wrote: > > Prelude> (x,y) <- return $ (repeat 1, repeat 2) > You didn't tell, which Monad this shall be. GHCi always runs in the IO monad. -- ryan ___ Haskell

Re: [Haskell-cafe] How can I stop GHCi from calling "show" for IO actions?

2007-09-17 Thread Henning Thielemann
On Sat, 15 Sep 2007, Sam Hughes wrote: That's weird. Prelude> (x,y) <- return $ (repeat 1, repeat 2) You didn't tell, which Monad this shall be. Prelude> Just x <- return $ Just (repeat 1) [1,1,1,... Prelude> (x,_) <- return $ (repeat 1, repeat 2) [1,1,1,... Prelude> Just (x,y) <- return $

Re: [Haskell-cafe] How can I stop GHCi from calling "show" for IO actions?

2007-09-17 Thread Stuart Cook
On 9/17/07, Martin Lütke <[EMAIL PROTECTED]> wrote: > What is the url for the wiki entry? There was already a page at http://haskell.org/haskellwiki/GHC/GHCi so I put it there, but I also took the liberty of creating some #REDIRECTs, so http://haskell.org/haskellwiki/ghci should work just

Re: [Haskell-cafe] How can I stop GHCi from calling "show" for IO actions?

2007-09-17 Thread Martin Lütke
On 9/16/07, Ryan Ingram <[EMAIL PROTECTED]> wrote: Is there a way to make GHCi not print the result of an action but still make my variables get bound? This seems to be a common question (I myself asked it recently), so I've added an entry to the GHCi page on the

Re: [Haskell-cafe] How can I stop GHCi from calling "show" for IO actions?

2007-09-16 Thread Rodrigo Queiro
I've always wondered if ghc(i) --help should be a bit more instructive, or perhaps if there were a man page that lay somewhere between the --help message and the manual in terms of comprehensiveness. It's a pretty major jump from a short description of 4 command line options (only one of which I ha

Re: [Haskell-cafe] How can I stop GHCi from calling "show" for IO actions?

2007-09-16 Thread Stuart Cook
On 9/16/07, Ryan Ingram <[EMAIL PROTECTED]> wrote: > Is there a way to make GHCi not print the result > of an action but still make my variables get bound? This seems to be a common question (I myself asked it recently), so I've added an entry to the GHCi page on the wiki. Id

Re: [Haskell-cafe] How can I stop GHCi from calling "show" for IO actions?

2007-09-15 Thread Sam Hughes
Ryan Ingram wrote: Prelude> let inf = repeat 1 Prelude> inf [1,1,(lots of output until I press ctrl-c),Interrupted. (I expect this to happen) Prelude> let x = inf (no output here!) Prelude> :t x x :: [Integer] Prelude> return inf [1,1,(lots of output until I press ctrl-c),Interrupted. (I also exp

Re: [Haskell-cafe] How can I stop GHCi from calling "show" for IO actions?

2007-09-15 Thread Stefan O'Rear
On Sat, Sep 15, 2007 at 08:35:02PM -0700, Ryan Ingram wrote: > Prelude> let inf = repeat 1 > Prelude> inf > [1,1,(lots of output until I press ctrl-c),Interrupted. > (I expect this to happen) > Prelude> let x = inf > (no output here!) > Prelude> :t x > x :: [Integer] > Prelude> return inf > [1,1,(l

[Haskell-cafe] How can I stop GHCi from calling "show" for IO actions?

2007-09-15 Thread Ryan Ingram
Prelude> let inf = repeat 1 Prelude> inf [1,1,(lots of output until I press ctrl-c),Interrupted. (I expect this to happen) Prelude> let x = inf (no output here!) Prelude> :t x x :: [Integer] Prelude> return inf [1,1,(lots of output until I press ctrl-c),Interrupted. (I also expect this to happen) P