Re: Proposal for a new I/O library design

2003-07-29 Thread Stefan Karrmann
Ben Rudiak-Gould (Sun, Jul 27, 2003 at 09:35:41PM -0700): module System.ProposedNewIOModel (...) where I assume that all I/O occurs in terms of octets. I think that this holds true of every platform on which Haskell is implemented or is likely to be implemented. type Octet = Word8

exceptions

2003-07-29 Thread John Meacham
just out of curiosity, which is the proper idiom? trace a = r - catch a (\e - putStr exceptional\n throw e) trace a = r - catch a (\e - putStr exceptional\n ioError e) I am worried that one might subtly change the semantics of an execption depending on how it was originally thrown... but i

RE: can't derive Monad

2003-07-29 Thread Simon Peyton-Jones
Just conservatism. Imagine newtype T = MkT [T] deriving(Eq) You'd get instance Eq [T] = Eq T which will make the type checker loop for sure. I'm not sure what a safe approximation might be. But I'll put your example in a comment in the source code as an example of a safe one

RE: GHC and Mingw32 (cont.)

2003-07-29 Thread Simon Peyton-Jones
I'm redirecting this to ghc bugs and cvs-ghc. The conclusion is that 'make install' on Win32 is currently broken. (Mostly people install from the .msi installer, which is why it's not much exercised.) I doubt it's really hard, just ticklish. Does any Win32 expert feel like fixing it? We'd be

[ ghc-Bugs-779150 ] ghci panics

2003-07-29 Thread SourceForge.net
Bugs item #779150, was opened at 2003-07-28 20:31 Message generated for change (Comment added) made by simonpj You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=108032aid=779150group_id=8032 Category: Driver Group: 6.0 Status: Closed Resolution: Fixed Priority: 5

Re: GHC and Mingw32 (cont.)

2003-07-29 Thread Mike Thomas
Hi Simon. If it's still a problem in approx one month I'll look into fixing it then as I feel that there may be areas of commonality with the nightly build bindist packaging for Windows - notably the way the MinGW32 C compiler is dealt with (or even at all with make install I suppose). Cheers

RE: GHC and Mingw32 (cont.)

2003-07-29 Thread Simon Peyton-Jones
Excellent, thank you. Will you assume yes please, and get back in touch in a month? If it's been done by then, I'll tell you. [mail to [EMAIL PROTECTED] is rejected with There was a SMTP communication problem with the recipient's email server. Please contact your system administrator.

Re: can't derive Monad

2003-07-29 Thread Dean Herington
Simon Peyton-Jones wrote: Just conservatism. Imagine newtype T = MkT [T] deriving(Eq) You'd get instance Eq [T] = Eq T which will make the type checker loop for sure. Actually not. swan(102)% cat Deriving.hs newtype N = N [N] deriving Eq n1 = N [] n2 = N [] n3 = N

RE: case-identity

2003-07-29 Thread Simon Peyton-Jones
Ahem. What I should have said is that the list of alternatives always covers all cases that can occur. For example in data Foo = Red | Green | Blue ...case x of Red - True other - ...(case x of Green - ... Blue - ... ) ... The

Lost output in multithreaded program

2003-07-29 Thread David Hughes
Dear list, I am puzzled by the behaviour of this (stripped-down, uglified) program. It is supposed to run a bunch of shell commands simultaneously, collate their standard output and error, and print their output as though they had run sequentially. module Main where import

Re: Can't compile hmake

2003-07-29 Thread Thomas Davie
On Tuesday, Jul 29, 2003, at 10:19 Europe/London, Malcolm Wallace wrote: Thomas Davie [EMAIL PROTECTED] writes: I'm just trying to get started with haskell and have been having some problems getting hmake to compile. For some reason it doesn't detect libreadline. FYI, I'm running Mac OS

Re: Can't compile hmake

2003-07-29 Thread Thomas Davie
On Tuesday, Jul 29, 2003, at 11:16 Europe/London, Keith Wansbrough wrote: I was wondering if idiocy was my problem there, I don't see the directory though: [nimbus2:project/hmake-3.08/targets] tatd100% ls -la total 0 drwxr-xr-x 3 tatd100 staff 102 Jul 29 10:42 . drwxr-xr-x 14 tatd100 staff

Using exceptions in imperative code

2003-07-29 Thread Bayley, Alistair
I've got resource acquisition (and release) code which looks like this at present: connect = do envHandle - envCreate errHandle - handleAlloc oci_HTYPE_ERROR envHandle serverHandle - handleAlloc oci_HTYPE_SERVER envHandle connection - dbLogon user password database envHandle

Parsing CSV files

2003-07-29 Thread Shawn P. Garbett
I did a small search for parsing a comma seperated file in Haskell and didn't find anything-- so I put together some code to do this. It doesn't handle whitespace very well, this would be a nice addition if someone has an idea out there. Also the rows method, I had trouble just using two do

Re: Parsing CSV files

2003-07-29 Thread Bryn Keller
Shawn P. Garbett wrote: I did a small search for parsing a comma seperated file in Haskell and didn't find anything-- I threw one together a while ago: http://www.xoltar.org/languages/haskell/CSV.hs which isn't much different than your example, though it does handle nested quotation marks.

Re: Parsing CSV files

2003-07-29 Thread Keith Wansbrough
Nevermind the previous version, I've solved a few bugs in it (like unquoted numbers and correctly handling blank fields). 1. Any string without commas or newlines can be unquoted; no need to restrict it to digits. 2. In a quoted string, (that is, two double quotes) stands for one double

Re: Parsing CSV files

2003-07-29 Thread John Meacham
Hey, I wrote a CSV parser too. seeing as how this seems like a common thing (having 3 independent implementations at least), perhaps it belongs in libraries somewhere? some area dedicated to useful little grammers would be handy. csv, c header files, .x (rpcgen), various preference file formats,

Re: Parsing CSV files

2003-07-29 Thread Shawn P. Garbett
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday 29 July 2003 01:40 pm, John Meacham wrote: Hey, I wrote a CSV parser too. seeing as how this seems like a common thing (having 3 independent implementations at least), perhaps it belongs in libraries somewhere? some area dedicated to

Re: Parsing CSV files

2003-07-29 Thread John Meacham
perhaps something like 'vim.sf.net's script section. where anyone can post a script (or haskell file). and everyone can immediatly see and download it. the good ones filter to the top, and since the individual files don't need to be part of a larger library infrastructure there is much more

Re: functional graph

2003-07-29 Thread Eray Ozkural
On Wednesday 16 July 2003 00:02, Hal Daume wrote: But it looks the Graph class works on types a and b where a is the Node type where b is the Edge type, or just the other way around :), I don't have the code right now. Yes, 'Graph n e' is a graph whose nodes are labelled with elements of