RE: [Haskell-cafe] how to avoid overlapping instance error?

2005-02-28 Thread S. Alexander Jacobson
If you are not using them to prevent overlapping instances, then why require instance decls at all? For example, why does GHC require an instance decl here: instance (Ord x)=ToSet [] x where toSet = Set.fromList But not here: listToSet x = Set.fromList x Or I suppose, one could rephrase

[Haskell-cafe] Numeric vs. relative precedences of infix operators

2005-02-28 Thread Henning Thielemann
Is it widely accepted that the precedence of infix operators is defined by numbers? The numbers look arbitrary to me and it is not possible to introduce infix operators with interim precedences. What about defining relations such as (*) has precedence over (+)? The compiler could construct a

Re: [Haskell-cafe] Numeric vs. relative precedences of infix operators

2005-02-28 Thread karczma
Henning Thielemann writes: Is it widely accepted that the precedence of infix operators is defined by numbers? The numbers look arbitrary to me and it is not possible to introduce infix operators with interim precedences. What about defining relations such as (*) has precedence over (+)? The

[Haskell-cafe] postgresql foreign function call segfaults

2005-02-28 Thread Edwin Eyan Moragas
Hi Group, i'm trying to complete an haskell pgsql interface. all compiles well when using ghc's generated executable but it segfaults when i do a pqexec. -- PGresult *PQexec(PGconn *conn, const char *query); foreign import ccall libpq-fe.h PQexec pqexec::X_PGconn-CString-IO X_PGresult

Re: [Haskell-cafe] Re: Bound threads

2005-02-28 Thread Marcin 'Qrczak' Kowalczyk
Simon Marlow [EMAIL PROTECTED] writes: Is it important which thread executes Haskell code (I bet no) and unsafe foreign calls (I don't know)? If not, couldn't the same OS thread execute code of both threads until a safe foreign call is made? Actually in a bound thread, *all* foreign calls

RE: [Haskell-cafe] how to avoid overlapping instance error?

2005-02-28 Thread Simon Peyton-Jones
| Or I suppose, one could rephrase this question as why not | simplify instance declarations to be: | |instance ToSet where | toSet = Set.fromList | | And let the typechecker take care of figuring out what instance is | being specified here? That might be possible, but Haskell forces

[Haskell-cafe] Browser-like UI

2005-02-28 Thread MaurĂ­cio
Hi, I've seen some options for GUI programming in Haskell libraries page, but what I really would like is to define my user interface using HTML (or, maybe, SVG). What are the options to do that in Haskell? I've read that Gtk2Hs has a mozilla rendering engine, but unfortunatly that won't

Re: [Haskell-cafe] Numeric vs. relative precedences of infix operators

2005-02-28 Thread ajb
G'day all. Quoting [EMAIL PROTECTED]: Widely accepted is a widely accepted relativism... I am also annoyed by the precedences 0,1,2, ...,9, etc. Why not 10, 20, 30,... ?? I _think_ we had this back around Haskell 1.1 (which I never used, but early Gofers also had it). Moreover, operators