Re: Running a "final" finaliser
On Tuesday 23 Dec 2003 7:22 am, Adrian Hey wrote: > Assuming the weak pointers solution is the way to go, I've been > re-aquainting myself with System.Mem.Weak and now I'm now wondering > what is an appropriate key for each ForeignPtr. > > Would it be OK to use the ForeignPtr itself as it's own key? > (Seems OK to me, but this is a bit different from the memoisation > example so I thought I'd check.) I guess I should've taken a look at mkWeakPtr :: k -> Maybe (IO ()) -> IO (Weak k) before asking this :-) Regards -- Adrian Hey ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
ghc-6-2-1.msi broken?
After having problem in building ghc-6.2 from source tarball, I installed ghc-6-2-1.msi build and then tried to compile darcs with it, but, strangely enough, configure script fails when trying to compile "Hello world!" program. I tried to compile: bash-2.05b# cat main.hs module Main(main) where main = putStrLn "Hello world!\n" but ghc only produces main.hi file - no output file "main". The same result within MSYS & MSDOS prompt. However, the same 'program' compiles and produces executable on my Gentoo box. It looks like Win32 build of ghc-6.2 is broken or am I missing something (being still a ghc newbie in the begining stages of learning Haskell :-( Sincerely, Gour -- Gour [EMAIL PROTECTED] Registered Linux User #278493 ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
ghc 6.2 build problem (MinGW/MSYS)
I'm pretty new with GHC and I have prblem building ghc 6.2 with MinGW compiler in MSYS environment. After running "configure --prefix=/mingw ; make" make fails with: [snip] copying ./mpn/generic/gmp-mparam.h to gmp-mparam.h gcc -E -mno-cygwin -undef -traditional -I../includes -x c -DHAVE_LIBMINGWEX package.conf.in \ | sed 's/^#.*$//g' >package.conf.inplace gcc -E -mno-cygwin -undef -traditional -I../includes -DINSTALLING -x c -DHAVE_LIBMINGWEX package.conf.in \ | sed 's/^#.*$//g' >package.conf.installed ../utils/ghc-pkg/ghc-pkg-inplace --update-package http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
GHC Warning Request
When -fwarn-unused-imports is switched on, "import M()" should not issue a warning. In 6.2, it does. The idea is that I only wish to import instance declarations here, and that's the obvious way of making that explicit. I'm using -Werror (new in 6.2, thanks), and most of the time I'm interested in knowing about superfluous imports. -- Ashley Yakeley, Seattle WA ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: GHC 6.2 breaks multiline string literals
John Meacham wrote: I have also wanted something like that on several occasions. ideally, I'd like something like python where. foo = """ hello this is preformatted text. """ will be the same as foo = "hello this is\npreformatted text.\n" I wouldn't want something like that in a language. It's very convenient, yes, but I'm uneasy at the prospect of an editor cutting off trailing blanks. I shudder at the prospect of an editor reinterpreting leading blanks as tabs or vice versa - the text will be interpreted differently depending on whether it's displayed in an editor, on a terminal, or in the dialog box of a GUI. This all doesn't matter much when all that one wants is a simple Usage: message in response to a --help option. But it would be hellishly difficult to make sure that every programmer understands the ramifications of using multiline string literals. Personally, I'd prefer having autoconcatenated strings like this: multilineLiteral = "\n" "\tline1\n" "\tline2" making all the representation decisions explicit. To edit that thing, I'd like a macro that took the autoconcatenated string literal at the current cursor position, created a temporary buffer with the parsed string, let the user edit it, and moved the unparsed results of that edit back into the original source code. Regards, Jo ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: GHC 6.2 breaks multiline string literals
On Sun, Dec 28, 2003 at 02:54:52AM +0100, Stefan Reich wrote: > Ferenc, thanks for your answer. It doesn't really solve my problem though... > > 1. Your method doesn't preserve the line-breaks within the resulting string. > > 2. Surrounding each line with special chars is actually what I want to > avoid. > > What I'm looking for is something similar to Perl's << and PHP's <<< > operator. I have also wanted something like that on several occasions. ideally, I'd like something like python where. foo = """ hello this is preformatted text. """ will be the same as foo = "hello this is\npreformatted text.\n" -- --- John Meacham - California Institute of Technology, Alum. - [EMAIL PROTECTED] --- ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users