Re: Panic

2004-06-14 Thread Sigbjorn Finne
Hi Arjan, the underlying GNU binutils issue which causes this was fixed some 9 months ago. I've been using a new mingw binutils snapshot for a while which includes it -- it's available from http://www.mingw.org/download.shtml (look for binutils-2.15.90-20040222.) You'll still see the

[ ghc-Bugs-972909 ] Posix.popen is broken

2004-06-14 Thread SourceForge.net
Bugs item #972909, was opened at 2004-06-15 11:25 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=108032aid=972909group_id=8032 Category: None Group: None Status: Open Resolution: None

RE: Parallel

2004-06-14 Thread Simon Marlow
On 03 June 2004 15:56, Goran Topic wrote: I am a newcomer to functional programming, and I would like to learn it very much. However, I'm also starting to deal with parallel programming, and I thought I'd combine my two interests. So I grabbed the Debian ghc6 package (v6.2), and (after a

RE: Glasgow Haskell on different versions of Linux

2004-06-14 Thread Simon Marlow
On 09 June 2004 20:09, Christian Maeder wrote: I wrote: since version 6.2 we have 2 binary distributions for (generic) linux: for glibc 2.2 and glibc 2.3 Maybe this is no longer necessary. I've produced an installation (under glibc 2.2) that runs under glibc 2.2 and glibc 2.3. I've now

RE: GMP

2004-06-14 Thread Simon Marlow
On 10 June 2004 01:15, John Meacham wrote: I was curious what the best way would be to access the various useful GMP functions which are not exported for Integers. I was thinking of making my own (strict) Integer type, but it would be much easier if I can just use the FFI to import the

RE: Data.Dynamic and dynamically loaded code

2004-06-14 Thread Simon Marlow
On 10 June 2004 05:32, Donald Bruce Stewart wrote: The problem appears to be in the hash keys of the type representation used to compare to types for equality. A dynamic value in the (statically compiled) application never has the same key as its equivalent type in the dynamically loaded

RE: Finalizers and FFI

2004-06-14 Thread Simon Marlow
To clarify some of the points in this discussion: Alastair is right in that the finalizer thread isn't necessarily run to completion if the main thread exits. GHC does run any outstanding finalizers at the end of the program, but it doesn't necessarily complete any existing finalizer threads

RE: DLLs and shared libraries

2004-06-14 Thread Simon Marlow
On 14 June 2004 03:03, Andrei de A. Formiga wrote: I need to generate DLLs (in Windows) and shared libraries (in unix environments) that expose some Haskell functions (directly or through a C stub). My first option is having ghc generate the libs directly with the foreign export

Re: IO question (hGetLine)

2004-06-14 Thread Gerd M
Duncan Coutts wrote: The GHC run time system is designed to block without using CPU when all threads are blocked doing IO. Could you give more details? It would be useful to see the code or preferably a small test case that demonstrates your problem. What version of ghc are you using? Which OS are

RE: Handrolled linker?

2004-06-14 Thread Simon Marlow
On 02 June 2004 18:41, David Brown wrote: On Wed, Jun 02, 2004 at 06:19:00PM +0100, Duncan Coutts wrote: On Wed, 2004-06-02 at 17:44, David Brown wrote: Any estimates on the difficulty of changing Linker.c to be able to use standard dynamic link calls (dlopen, ...) rather than having to be

RE: Unregistered build (was Re: AMD64)

2004-06-14 Thread Simon Marlow
On 02 June 2004 18:40, Bennett Todd wrote: I too would be happy with an unregistered build. I've tried off and on to port ghc to my linux distro (uses static linking against uClibc, glibc isn't present at all). Every time I go through the process, I get stuck at the point where I seem to

Re: Unregistered build (was Re: AMD64)

2004-06-14 Thread Bennett Todd
2004-06-14T16:06:05 Simon Marlow: You probably don't want to install the registerised build; just use it to build a fresh tree: $ ./configure --with-ghc=/unregisterised-build/ghc/compiler/ghc-inplace $ make Thanks, I'll give it another go. It'll be a few days before I can get back with

Re: Handrolled linker?

2004-06-14 Thread David Brown
On Mon, Jun 14, 2004 at 05:03:20PM +0100, Simon Marlow wrote: Actually, this isn't the question that I have. This is about ghci's dynamic loading of C objects (or other similar language). There is a handrolled linker in the ghci code. I'm interested in replacing this handrolled linker

Re: Parallel

2004-06-14 Thread Ketil Malde
Simon Marlow [EMAIL PROTECTED] writes: For the GPH project, go here: http://www.macs.hw.ac.uk/~dsg/gph/ There's also a bit of information in: http://www.haskell.org/communities/05-2004/html/report.html#gph -kzm -- If I haven't seen further, it is by standing in the footprints of giants

Re: Unregistered build (was Re: AMD64)

2004-06-14 Thread Gerd M
Well I just tried it and that's what happened: ==fptools== make boot - --no-print-directory -r; in ghc-6.2.1/ghc/utils/ghc-pkg ghc-test/usr/bin/ghc -M

Re: Unregistered build (was Re: AMD64)

2004-06-14 Thread Gerd M
This was causing the error: version = tail \ \ GHC_PKG_VERSION However, when i moved it all in one line it worked and i got as far as this but i think that's the end of the line for now: ==fptools== make boot -wr; in

Re: Data.Dynamic and dynamically loaded code

2004-06-14 Thread Donald Bruce Stewart
simonmar: On 10 June 2004 05:32, Donald Bruce Stewart wrote: The problem appears to be in the hash keys of the type representation used to compare to types for equality. A dynamic value in the (statically compiled) application never has the same key as its equivalent type in the

dynamically loading the dynamic loader

2004-06-14 Thread Donald Bruce Stewart
At the moment I am unable to load the hs-plugins package into GHCi (or via the hs-plugins load() either). It seems the linker is always unable to find the symbols we bind to in Linker.c, i.e. addDLL, loadObj, and friends. How can I get the linker to see the HSrts/libHSrts symbols exported by

[Haskell] IO, exceptions and error handling

2004-06-14 Thread Graham Klyne
I'm finding that a recurring theme in my work with Haskell libraries (and in particular the XML libraries) is the awkwardness of handling errors outside the IO monad. While it's often very easy to write some code that performs some function, assuming that the inputs are valid, as soon as code

Re: [Haskell] IO, exceptions and error handling

2004-06-14 Thread Keith Wansbrough
I can't see any fundamental reason why exception handling has to occur in the IO monad. Read the paper _A Semantics for Imprecise Exceptions_. The problem is that the evaluation order of Haskell would have to be fixed for this not to lose referential transparency. What is the value of

Re: [Haskell] IO, exceptions and error handling

2004-06-14 Thread Duncan Coutts
On Mon, 2004-06-14 at 14:34, Graham Klyne wrote: I'm finding that a recurring theme in my work with Haskell libraries (and in particular the XML libraries) is the awkwardness of handling errors outside the IO monad. With GHC You can throw exceptions in pure code but may only catch them in

Re: [Haskell] Annoying naming clashes

2004-06-14 Thread Ben . Yu
Tom, Then what will you do when naming operations in a class? Is it right that care has to be taken in order not to conflict with other classes? Say, I have a Person class where I want to define an operation getName. Is it wise to name it getPersonName instead? I notice that FiniteMap always

RE: [Haskell] IO, exceptions and error handling

2004-06-14 Thread Tim Docker
Keith Wansbrough wrote: Read the paper _A Semantics for Imprecise Exceptions_. The problem is that the evaluation order of Haskell would have to be fixed for this not to lose referential transparency. What is the value of catchExcept (show (makeExcept E1 + makeExcept E2)) (\x - x)

[Haskell] Soft2004 workshop CFP

2004-06-14 Thread Stefano Bistarelli
=== 6th International Workshop on Soft Constraints and Preferences September 27th, 2004 Toronto, Canada Held in conjunction with 10th International Conference on

Re: [Haskell] IO, exceptions and error handling

2004-06-14 Thread Mark Carroll
On Mon, 14 Jun 2004, Keith Wansbrough wrote: (snip) to lose referential transparency. What is the value of catchExcept (show (makeExcept E1 + makeExcept E2)) (\x - x) ? Haskell wouldn't be purely functional any more. (snip) We've already had these issues raised on haskell-cafe when I've

RE: [Haskell] IO, exceptions and error handling

2004-06-14 Thread Philippa Cowderoy
On Mon, 14 Jun 2004, Tim Docker wrote: Both of these approaches seem fairly invasive in their effect on the code. Are people using haskell for real world tasks happy with having to choose from these? The former is more general, but any function that needs to be able to fail or propagate

Re: [Haskell] IO, exceptions and error handling

2004-06-14 Thread Graham Klyne
Now I see it. Thanks. Thanks also for the reference. Nice paper! So now where do I stand? I still think that being forced to handle exceptions in the IO monad is (sometimes) inconvenient, but I can now see why it is required for a rigorous language semantics. My problem relates to wanting to

RE: [Haskell] IO, exceptions and error handling

2004-06-14 Thread Tim Docker
Philippa Cowderoy wrote: The ability to fail doesn't need the do notation, just use of return for success - similar for propagating failure. I'm not sure I understand. Do you mean writing functions like: sqr x | x 0 = fail less than zero | otherwise = return (sqrt x) If

Re: [Haskell] IO, exceptions and error handling

2004-06-14 Thread Keith Wansbrough
Philippa Cowderoy wrote: The ability to fail doesn't need the do notation, just use of return for success - similar for propagating failure. I'm not sure I understand. Do you mean writing functions like: sqr x | x 0 = fail less than zero | otherwise = return

RE: [Haskell] IO, exceptions and error handling

2004-06-14 Thread Tim Docker
Keith Wansbrough wrote: s/fail/error/ s/return// Then you can easily write I can't (easily) write text c = sqr x + sqr (x+1) You just can't *catch* this outside the IO monad. Of course... that was my second alternative error strategy. I'm interest in how/when people decide

Re: [Haskell] IO, exceptions and error handling

2004-06-14 Thread Alastair Reid
I assume the suggested mapException function [sect 5.4] remains unproblematic ... is it (or some equivalent) actually implemented? http://etudiants.insia.org/~jbobbio/pafp/docs/base/Control.Exception.html#v% 3AmapException The same page has a host of other useful operations. Two useful

Re: [Haskell] Programming language shootout (completing the Haskell entry)

2004-06-14 Thread Carl Witty
On Fri, 2004-03-26 at 14:39, Sean E. Russell wrote: On Friday 26 March 2004 17:04, Carl Witty wrote: Are you aware of this: 2001-12-12 * Due to wanting to get on with other things, I'm freezing the shootout as is, with no further updates planned. It isn't

Re: [Haskell] IO, exceptions and error handling

2004-06-14 Thread John Meacham
On Mon, Jun 14, 2004 at 05:41:03PM +0100, Keith Wansbrough wrote: Philippa Cowderoy wrote: The ability to fail doesn't need the do notation, just use of return for success - similar for propagating failure. I'm not sure I understand. Do you mean writing functions like:

Re: [Haskell] Annoying naming clashes

2004-06-14 Thread André Pang
On 12/06/2004, at 9:52 AM, [EMAIL PROTECTED] wrote: Hi, when writing haskell code. It is so annoying that name clashes keep happening. I have to be careful about the data constructor names, about the class names, about the class member names. I understand that we can use class to achieve some

Re: [Haskell] Annoying naming clashes

2004-06-14 Thread John Meacham
Another problem is that people learning haskell, especially those coming from a OO background or language like java, tend to write code that needlessly exasperates the naming conflict problem. I think this is because of the initial steps one usually takes in other languages, the first thing one

Re: [Haskell] IO, exceptions and error handling

2004-06-14 Thread David Menendez
Graham Klyne writes: Another approach that occurs to me is to introduce an error Monad along the lines of that described by Philip Wadler as E in his Essence of functional programming paper [1]. (Or just use Either as an error monad?, which is part of what I've been doing with my XML work.)

[Haskell-cafe] Modules and files

2004-06-14 Thread Andrei de A. Formiga
Hi, Is it possible to have more than one module defined in a single file ? As far as I can tell, the Haskell Report doesn't prohibit this, but so far my tests with hugs and ghc indicate they don't accept multi-module files. Is this standard ? Thanks. --- []s, Andrei de A. Formiga

Re: [Haskell-cafe] Modules and files

2004-06-14 Thread Iavor S. Diatchki
hello, according to the report there should be no connection between modules and files, and one should be able to have multiple modules in a file, and even a single module in multiple files. however none of the implementations support that, so in effect there is 1-1 correspondence between