Hi Evan,
You can also reuse the name exactly by using bind+return instead of
let:
test filename = do
is_dir - doesDirectoryExist filename
filename - return $ if not is_dir then filename else filename
I'm not a huge fan of the prime thing because it's tiny and easy to
miss and if you
Dear haskeller,
Can I destructive rebind a local variable like this
import System.Directory
test filename = do
is_dir - doesDirectoryExist filename
let filename = if not is_dir then filename else filename
putStrLn $ filename ++ filename
main = test .
in GHCi 6.10.1 on WinXP,
Hi Luke
Thank you ! I got it :)
Best Regards
Chunye Wang chunye.w...@nsn.com
From: ext Luke Palmer [mailto:lrpal...@gmail.com]
Sent: Tuesday, January 06, 2009 3:44 PM
To: Wang, Chunye (NSN - CN/Beijing)
Cc: Haskell-Cafe@haskell.org
Subject: Re
6.6.1. That version should
still be able to built 6.10.1 from source and should still be usable for
the RWH book.
Duncan
-Original Message-
From: ext Duncan Coutts [mailto:duncan.cou...@worc.ox.ac.uk]
Sent: Monday, December 22, 2008 7:37 PM
To: Wang, Chunye (NSN - CN/Beijing)
Cc
:38 PM
To: Wang, Chunye (NSN - CN/Beijing)
Cc: Haskell-Cafe@haskell.org
Subject: RE: [Haskell-cafe] Can I build and install GHC 6.10.1
withoutprevious installed ghc
On Mon, 2008-12-22 at 11:53 +0800, Wang, Chunye (NSN - CN/Beijing)
wrote:
I tried to install the ghc 6.8.0 last year but failed
Hi All,
I have our own Linux distribution installed in my server.
it is based on RedHat 9.0. Because it is the server, I can
not update it to any other linux distribution
Here is my situation, I have no machine with any version of ghc
installed.
This is
To: Wang, Chunye (NSN - CN/Beijing)
Cc: Haskell-Cafe@haskell.org; glasgow-haskell-us...@haskell.org
Subject: Re: [Haskell-cafe] Can I build and install GHC 6.10.1 without
previous installed ghc
chunye.wang:
Hi All,
I have our own Linux distribution installed in my server