[Haskell] Re: [Haskell - I/O] Problem with 'readFile'

2006-08-27 Thread Benjamin Franksen
L. J. wrote: > Hi, I use the operation 'readFile' for obtain information locates on > a file. When I try to write another information on the same file, I > obtain this error message: "openFile: permision denied". I found this: > "The readFile operation holds a semi-closed handle on the file until

Re[4]: [Haskell] [Haskell - I/O] Problem with 'readFile'

2006-08-27 Thread Bulat Ziganshin
Hello John, Sunday, August 27, 2006, 5:45:21 PM, you wrote: >> return $! tail mates_str > But you need to evaluate the result of readFile all the way to the end--you > need to use a function that traverses the entire file contents. Otherwise > the file will be left open to read the bit you haven'

Re: Re[2]: [Haskell] [Haskell - I/O] Problem with 'readFile'

2006-08-27 Thread Udo Stenzel
Bulat Ziganshin wrote: > > length mates_str `seq` return () > > it's the same. i recommend you to use: > > return $! tail mates_str > > 'tail' should be slightly faster than 'len' ...but also slightly less correct. You probably meant 'last'. (But it's still an ugly and dangerous programming

Re: Re[2]: [Haskell] [Haskell - I/O] Problem with 'readFile'

2006-08-27 Thread John Hughes
Hello L., Sunday, August 27, 2006, 12:43:24 PM, you wrote: > length s `seq` writeFile f ("hello"++s) length mates_str `seq` return () it's the same. i recommend you to use: return $! tail mates_str $! defined as f$!x = x `seq` f x 'tail' should be slightly faster than 'len' --

Re[2]: [Haskell] [Haskell - I/O] Problem with 'readFile'

2006-08-27 Thread Bulat Ziganshin
Hello L., Sunday, August 27, 2006, 12:43:24 PM, you wrote: >> > length s `seq` writeFile f ("hello"++s) > length mates_str `seq` return () it's the same. i recommend you to use: return $! tail mates_str $! defined as f$!x = x `seq` f x 'tail' should be slightly faster than 'len' -- Be

Re: [Haskell] [Haskell - I/O] Problem with 'readFile'

2006-08-27 Thread L. J.
On 8/27/06, Donald Bruce Stewart <[EMAIL PROTECTED]> wrote: djsenda: > Hi, I use the operation 'readFile' for obtain information locates on > a file. When I try to write another information on the same file, I > obtain this error message: "openFile: permision denied". I found this: > "The readFil

Re: [Haskell] [Haskell - I/O] Problem with 'readFile'

2006-08-27 Thread L. J.
On 8/27/06, L. J. <[EMAIL PROTECTED]> wrote: On 8/27/06, John Hughes <[EMAIL PROTECTED]> wrote: > > > > Hi, I use the operation 'readFile' for obtain information locates on > > a file. When I try to write another information on the same file, I > > obtain this error message: "openFile: permision

Re: [Haskell] [Haskell - I/O] Problem with 'readFile'

2006-08-27 Thread Udo Stenzel
L. J. wrote: > Hi, I use the operation 'readFile' [...] > > How can I break that semi-closed handle for to write in the > preaviously readed file? Thank you. Not at all. But you can get the same effect you get from 'readFile' if you use 'openFile' and 'hGetContents'. If you do the latter, you c

Re: [Haskell] [Haskell - I/O] Problem with 'readFile'

2006-08-27 Thread L. J.
On 8/27/06, John Hughes <[EMAIL PROTECTED]> wrote: > Hi, I use the operation 'readFile' for obtain information locates on > a file. When I try to write another information on the same file, I > obtain this error message: "openFile: permision denied". I found this: > "The readFile operation hold

[Haskell] [Haskell - I/O] Problem with 'readFile'

2006-08-26 Thread L. J.
Hi, I use the operation 'readFile' for obtain information locates on a file. When I try to write another information on the same file, I obtain this error message: "openFile: permision denied". I found this: "The readFile operation holds a semi-closed handle on the file until the entire contents o

Re[2]: [Haskell] Haskell I/O inside: down the rabbit's hole

2006-07-04 Thread Bulat Ziganshin
Hello Joel, Tuesday, July 4, 2006, 11:41:04 AM, you wrote: > I couldn't find a way to reach your tutorial from the Wiki homepage. > There's http://www.haskell.org/haskellwiki/Introduction_to_IO under > Idioms but there's no tutorials section that I can see. at the second attempt i've understoo

Re[2]: [Haskell] Haskell I/O inside: down the rabbit's hole

2006-07-04 Thread Bulat Ziganshin
Hello Joel, Tuesday, July 4, 2006, 11:41:04 AM, you wrote: > Bulat, > I couldn't find a way to reach your tutorial from the Wiki homepage. > There's http://www.haskell.org/haskellwiki/Introduction_to_IO under > Idioms but there's no tutorials section that I can see. This page already contai

Re: [Haskell] Haskell I/O inside: down the rabbit's hole

2006-07-04 Thread Joel Reymont
Bulat, I couldn't find a way to reach your tutorial from the Wiki homepage. There's http://www.haskell.org/haskellwiki/Introduction_to_IO under Idioms but there's no tutorials section that I can see. Thanks, Joel -- http://wagerlabs.com/ ___

[Haskell] Haskell I/O inside: down the rabbit's hole

2006-07-04 Thread Bulat Ziganshin
Hello haskell, Haskell I/O has always been a source of confusion and surprises for new Haskellers. While simple I/O code in Haskell looks very similar to its equivalents in imperative languages, attempts to write somewhat more complex code often end with a total mess. This is because Haskell I/O

Re[2]: [Haskell] Streams: the extensible I/O library

2006-02-10 Thread Bulat Ziganshin
eloped, it implements much less features than now, and its implementation was enough simple and straightforward. as time goes, the more and more features was added to this library: complex buffering scheme, several async i/o implementations, locking, networking. And at current moment, GHC's Syst

Re: [Haskell] Re: Streams: the extensible I/O library

2006-02-06 Thread Bulat Ziganshin
Hello Aaron, Monday, February 06, 2006, 9:46:56 PM, you wrote: >> ps: the library also includes two more layers - binary I/O and >> serialization - on top of Streams. now i'm hardly working on >> documenting these modules AD> Disclaimer: I haven't looked at the c

[Haskell] Re: Streams: the extensible I/O library

2006-02-06 Thread Peter Simons
Bulat Ziganshin writes: > You can find further information about the library at the > page http://haskell.org/haskellwiki/Library/Streams and > download it as http://freearc.narod.ru/Streams.tar.gz Is there any chance of running this code on a non-Windows system? I tried to compile the example

[Haskell] Re: Streams: the extensible I/O library

2006-02-06 Thread Aaron Denney
On 2006-02-06, Bulat Ziganshin <[EMAIL PROTECTED]> wrote: > Hello > > I have developed a new I/O library that IMHO is so sharp that it can > eventually replace the current I/O facilities based on using Handles. > The main advantage of the new library is its strong m

[Haskell] Streams: the extensible I/O library

2006-02-06 Thread Bulat Ziganshin
Hello I have developed a new I/O library that IMHO is so sharp that it can eventually replace the current I/O facilities based on using Handles. The main advantage of the new library is its strong modular design using typeclasses. The library consists of small independent modules, each

I/O multiplexing

2003-10-28 Thread Peter Simons
Hi, I have a question concerning "manual" I/O multiplexing in Haskell, or specifically with GHC. I have written an interface to the C library ADNS, which performs asynchronous DNS queries. Everything is fine and dandy, but now comes the hard part: The function foreign im

RE: Help with Exceptions on I/O

2003-08-14 Thread Hal Daume
EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alexandre Weffort Thenorio Sent: Tuesday, August 12, 2003 4:17 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Help with Exceptions on I/O I have a program which creates textfiles out of other files. Since the program is runned

Help with Exceptions on I/O

2003-08-14 Thread Alexandre Weffort Thenorio
I have a program which creates textfiles out of other files. Since theprogram is runned from windows I output some text strings (Like "Filecreated succefully") and I need to stop the program before it quits so thatthe user can read the line outputted to know what went on and then he canpress

Help with Exceptions on I/O

2003-08-14 Thread Alexandre Weffort Thenorio
I have a program which creates textfiles out of other files. Since the program is runned from windows I output some text strings (Like "File created succefully") and I need to stop the program before it quits so that the user can read the line outputted to know what went on and then he can press EN

RE: Help with Exceptions on I/O

2003-08-14 Thread Brandon Michael Moore
ilto:[EMAIL PROTECTED] On Behalf Of Alexandre Weffort > Thenorio > Sent: Tuesday, August 12, 2003 4:17 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Help with Exceptions on I/O > > > I have a program which creates textfiles out of other files. Since the &g

RE: Text I/O library proposal, first draft

2003-08-05 Thread Hal Daume
[mailto:[EMAIL PROTECTED] On Behalf Of John Meacham > Sent: Thursday, July 31, 2003 4:36 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: Text I/O library proposal, first draft > > > presumably if you are doing random access on the file, it is > in a known > nona

Re: Text I/O library proposal, first draft

2003-07-31 Thread Glynn Clements
Ben Rudiak-Gould wrote: > module System.TextIOFirstDraft (...) where > > -- A BlockRecoder takes source and destination buffers and does some sort > -- of translation between them. It returns the number of values (not > -- bytes!) consumed and the number of values produced. It does not have to >

Re: Text I/O library proposal, first draft

2003-07-31 Thread John Meacham
presumably if you are doing random access on the file, it is in a known nonarbitrary text encoding (like utf8). in which case you can read/access the file with the binary routines and just use the appropriate text conversions to get data out. John On Thu, Jul 31, 2003 at 03:55:44PM -0700,

RE: Text I/O library proposal, first draft

2003-07-31 Thread Hal Daume
Hi Ben, > Bad things: > > * There's no way to implement fgetpos/fsetpos type functionality, > because coders don't expose their internal state. (In fact, there > would need to be a way to explicitly copy the state, since it may > well include IORefs, Ptrs, etc.) Is this a serious pr

Text I/O library proposal, first draft

2003-07-31 Thread Ben Rudiak-Gould
[Crossposted to Haskell and Libraries. Replies to Libraries.] {- Good things about this text library design: * Efficient implementation should be straightforward * Character coder interface is public, so users can supply their own encodings, or write coder transformers (there are some in

Raw I/O library proposal, second (more pragmatic) draft

2003-07-31 Thread Ben Rudiak-Gould
[Crossposted to Haskell and Libraries. Replies to Libraries.] -- More comments, please. Bad names? Important missing functionality? -- Still unimplementable? module System.RawIOSecondDraft (...) where data File -- now essentially a file handle data InputChannel -- renamed f

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 > implem

Re: System.Directory (was RE: Proposal for a new I/O library design)

2003-07-28 Thread Glynn Clements
Hal Daume wrote: > Would there be any way to get some of these differences into the > System.Directory structure? At least the following would be nice: > > > pathSeparator :: Char > > '\\' on Windows, '/' on unices, ':' (I believe) on macs, etc... Either '\\' or '/' on Windows. The former is p

Re: System.Directory (was RE: Proposal for a new I/O library design)

2003-07-28 Thread Ben Rudiak-Gould
On Mon, 28 Jul 2003, Wolfgang Thaller wrote: > It's not that easy. Case sensitivity is a property of a file system, > not of the operating system. Actually, it's not even that easy. The NT native API allows you to specify case sensitivity as a flag when creating or opening a file in any director

Re: System.Directory (was RE: Proposal for a new I/O library design)

2003-07-28 Thread John Meacham
On Mon, Jul 28, 2003 at 07:51:51PM +0200, Wolfgang Thaller wrote: > >>isCaseSensitive :: Bool > >>False on Windows, True on (all?) unices, i have no idea on macs > > It's not that easy. Case sensitivity is a property of a file system, > not of the operating system. > So if you mount a Windows or

Re: Proposal for a new I/O library design

2003-07-28 Thread Sven Panne
Tomasz Zielonka wrote: You certainly can't always mmap the whole file into memory at once (on a 32-bit architecture at least), because: [...] I think all these issues are handled by java.nio.Buffer and friends. Are there any people on this list with real-world war stories about java.nio? So far I h

Re: System.Directory (was RE: Proposal for a new I/O library design)

2003-07-28 Thread Wolfgang Thaller
pathSeparator :: Char '\\' on Windows, '/' on unices, ':' (I believe) on macs, etc... Used to be ':' in Classic MacOS, and there are still some old routines in Apple's Carbon library that take ':'-separated paths. However, Apple always insisted that Pathnames should only be used for display purp

Re: Proposal for a new I/O library design

2003-07-28 Thread Tomasz Zielonka
On Mon, Jul 28, 2003 at 12:56:04PM -0500, Tim Sweeney wrote: > Ben, > > I live in a different universe, but over here I prefer to represent files > purely as memory-mapped objects. In this view, there is no difference > between a read-only file and an immutable array of bytes (a byte being a > na

Re: Proposal for a new I/O library design

2003-07-28 Thread Sven Panne
Tim Sweeney wrote: I live in a different universe, but over here I prefer to represent files purely as memory-mapped objects. [...] I'd prefer "official" support for this in Haskell, too. The need for this and other I/O-related stuff was recognized by the Java community, too: It

Re: Proposal for a new I/O library design

2003-07-28 Thread Tim Sweeney
lt;[EMAIL PROTECTED]> Sent: Sunday, July 27, 2003 11:35 PM Subject: Proposal for a new I/O library design > The other day I was reading the Haskell i18n debate in the list archives, > and started thinking about possible replacements for the existing Haskell > file I/O model. > &

System.Directory (was RE: Proposal for a new I/O library design)

2003-07-28 Thread Hal Daume
Hi guys, I'm not replying to anything in the message, but... > Is the idea > to abstract away from the syntax of pathnames on the platform (eg. > directory separator characters)? If so, I'm not sure it's worthwhile. > There are lots of differences between pathname conventions: case > sensitivity

RE: Proposal for a new I/O library design

2003-07-28 Thread Simon Marlow
to integrate other objects such as Sockets into the I/O system, which can also have streams layered on top of them. I'm concerned about one implementation difficulty. Your File type is independent of the filesystem. That is, on Unix it corresponds to an inode. Creating a File must correspo

Proposal for a new I/O library design

2003-07-27 Thread Ben Rudiak-Gould
The other day I was reading the Haskell i18n debate in the list archives, and started thinking about possible replacements for the existing Haskell file I/O model. It occurred to me that the Haskell community has really dropped the ball on this one. Haskell's design has always emphasized

Re: Binary I/O in haskell.

2003-01-28 Thread Adrian Hey
On Tuesday 28 January 2003 11:07, Immanuel Litzroth wrote: > What exactly does the castIOUArray function do? I asked the exact same question a couple of weeks ago. The think the answer is it does nothing. Have a look at the "What does castIOUArray do?" and "Endian mode and hPutBuf & hGetBuf" thre

Re: Binary I/O in haskell.

2003-01-28 Thread Immanuel Litzroth
If you dont want to wait for libraries in development, the easiest way to do real binary IO is via hGetArray and hPutArray which let you get and put raw arrays of bytes (Word8). unfortunatly, there is no way to do binary IO in pure Haskell 98. http://haskell.cs.yale.edu/ghc/docs/latest/html/base

AW: Binary I/O in haskell.

2003-01-28 Thread Markus . Schnell
r 2003 11:55 An: [EMAIL PROTECTED] Betreff: Binary I/O in haskell. I am currently writing a small sound/dsp application in haskell, and I am having some problems deciding on the best way to do I/O from soundfiles. I am currently only implementing raw data input, and I am looking for code examples that

Re: Binary I/O in haskell.

2003-01-27 Thread John Meacham
to do I/O from > soundfiles. I am currently only implementing raw data input, and I am > looking for code examples that demonstrate the best way(s) to > implement reading in and processing large amounts of data. > Any help is

Binary I/O in haskell.

2003-01-27 Thread Immanuel Litzroth
I am currently writing a small sound/dsp application in haskell, and I am having some problems deciding on the best way to do I/O from soundfiles. I am currently only implementing raw data input, and I am looking for code examples that demonstrate the best way(s) to implement reading in and

RE: Gtk and Object I/O

2003-01-20 Thread Krasimir Angelov
--- Simon Peyton-Jones <[EMAIL PROTECTED]> wrote: > | going to stop gtk+hs because of this". So it seems > we are all > | waiting for the critical user mass that makes our > own beloved > | GUI library (binding) the standard GUI library. > For the sake > | of Haskell, we can only hope that this

RE: Gtk and Object I/O

2003-01-20 Thread Simon Peyton-Jones
| going to stop gtk+hs because of this". So it seems we are all | waiting for the critical user mass that makes our own beloved | GUI library (binding) the standard GUI library. For the sake | of Haskell, we can only hope that this will actually happen | one day. A sad side-effects of this is t

Re: Gtk and Object I/O

2003-01-18 Thread Manuel M T Chakravarty
Axel Simon <[EMAIL PROTECTED]> wrote, > when I first asked Manuel (author of gtk+hs) if it is ok to make my Gtk > binding public, he said something along the lines of "I can't keep you > from making it public" and "I am not going to stop gtk+hs because of > this". Just for the record, what I sai

Re: Gtk and Object I/O

2003-01-17 Thread Nick Name
On Fri, 17 Jan 2003 21:12:51 +0100 Nick Name <[EMAIL PROTECTED]> wrote: > (this is an argument for the Haskell > mailing list) I didn't notice that this discussion wasn't already on the haskell mailing list, and tought that it was on gtk2hs, in case someone is wondering :) Vincenzo

Re: Gtk and Object I/O

2003-01-17 Thread Krasimir Angelov
--- Axel Simon <[EMAIL PROTECTED]> wrote: > Hi Krasimir, > > In the last two years I have implemented a binding > of Gtk Version 2 to > Haskell. I read the first paper about Object I/O of > Peter Achten and Simon > PJ which was published in IFL'00. I wond

Re: Gtk and Object I/O

2003-01-17 Thread Nick Name
On Fri, 17 Jan 2003 15:12:55 + Axel Simon <[EMAIL PROTECTED]> wrote: > Two answers: "Me too." and "I am.". But how can we proceed from here? > > I think we should all be more flexible and communicate more openly > and earlier. The latter probably would have avoided that I went off > and di

Re: Gtk and Object I/O

2003-01-17 Thread Axel Simon
effort we put in writing the code. More to the point: On Fri, Jan 17, 2003 at 01:34:59AM -0800, Krasimir Angelov wrote: > Dear Axel, > > The Object I/O development is currently frozen. The > native Win32 backend works but maybe still have bugs. > I still support the library but

Re: lazy stream I/O

2002-12-12 Thread Nigel Perry
At 12:11 am +0100 13/12/02, Wolfgang Jeltsch wrote: what are the arguments against lazy stream I/O? For starters sooner or later the input prompts appear after the input request - I've even seen systems get two prompts out of sync. HTH, Nigel -- Nigel Perry, New Ze

lazy stream I/O

2002-12-12 Thread Wolfgang Jeltsch
Hello, what are the arguments against lazy stream I/O? Wolfgang ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

ObjectIO moved (was: Re: ANNOUNCE: Object I/O released)

2002-04-09 Thread Krasimir Angelov
See http://www.haskell.org/ObjectIO __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listi

Re: ANNOUNCE: Object I/O released

2002-04-09 Thread Rijk J. C. van Haaften
>The quick reference still gives problems. I managed to download the quick reference. Get it at http://www.students.cs.uu.nl/people/rjchaaft/ObjectIO/objectio-ref.zip This is a very temporarily available service, so if anyone has a suitable server (again, cvs.haskell.org?), please take over hos

Re: ANNOUNCE: Object I/O released

2002-04-09 Thread Arjan van IJzendoorn
Hi, > [...Object I/O download problems...] > Try again. The trouble is resolved The quick reference still gives problems. And as for the binary package, I'm still waiting. 47 bytes/sec.. :-( I really want to see this libr

RE: ANNOUNCE: Object I/O released

2002-04-09 Thread Krasimir Angelov
--- Peter Achten <[EMAIL PROTECTED]> wrote: > Hello Krasimir, > > I am very curious about your implementation of the > Object I/O system, but > unfortunately could not open the .zip files either > (same symptoms as Arjan > van IJzendoorn wrote). Could you check t

Re: ANNOUNCE: Object I/O released

2002-04-08 Thread Rijk J. C. van Haaften
Hello all, Peter Achten and Arjan van IJzendoorn wrote: >I <...> unfortunately could not open the .zip files and Peter asked >Could you check the formats of these files? After having tried to download the file a few times, I believe the problem is not in the zip file format, but download failur

RE: ANNOUNCE: Object I/O released

2002-04-08 Thread Krasimir Angelov
:: ls , wlsHandle :: WindowHandle ls ps } as data WindowLSHandle ls ps = WindowLSHandle { wlsState:: MVar ls-- or IORef ls , wlsHandle :: WindowHandle ls ps } That let Object I/O to manage local state but simplifies implementation of

RE: ANNOUNCE: Object I/O released

2002-04-08 Thread Peter Achten
Hello Krasimir, I am very curious about your implementation of the Object I/O system, but unfortunately could not open the .zip files either (same symptoms as Arjan van IJzendoorn wrote). Could you check the formats of these files? Thanks in advance. Simon Peyton-Jones wrote: >Krasi

Re: String type in Socket I/O

2002-04-08 Thread dominic . j . steinitz
. Dominic. "Warrick Gray" <[EMAIL PROTECTED]>@haskell.org on 07/04/2002 13:31:41 Sent by: [EMAIL PROTECTED] To: libraries cc: bcc: Subject: String type in Socket I/O Hi all, I am writing an HTTP client-side library, using the SocketPrim library. During the implementati

Re: ANNOUNCE: Object I/O released

2002-04-08 Thread Arjan van IJzendoorn
Hi, I was very enthousiastic when I read about the release of Object I/O for Haskell, but when I try to open the ZIP files, WinZIP complains that "it is not a valid archive". unzip under Unix says: End-of-central-directory signature not found. And why is there not a small webpa

ANNOUNCE: Object I/O released

2002-04-08 Thread Krasimir Angelov
The first release, 0.1, of Object I/O is now available. The Object I/O for Haskell library is a port of standard Clean Object I/O library. The general structure of the Haskell version is inherited from the original library but there are also few differences provoked from the languages

I/O buffering (was: Endangered I/O operations)

2001-05-24 Thread Simon Marlow
e. GHC does this if possible. One other point that I noticed while re-implementing I/O: the description for hLookAhead states that "Computation hLookAhead hdl returns the next character from handle hdl without removing it from the input buffer". What if the handle is unbuffered? A work

Re: The world's smartest i/o device for Haskell

2000-11-07 Thread Jan Skibinski
Since I have noticed some moderate interest in this subject: several hundred visitors to the main page - some recurring, several dozens peeks at the module Hugs.st (some recurring again) and several encouraging private messages - including some from the pil

Re: The world's smartest i/o device for Haskell

2000-11-02 Thread Hannah Schroeter
Hello! On Wed, Nov 01, 2000 at 02:40:39PM -0500, Jan Skibinski wrote: > Described in: > http://www.numeric-quest.com/haskell/smartest.html Neat. On page 2 (in lynx, 25 line display), I seemed to recognize it. The real name begins with Sq*** :-) Nice idea that a Haskell IDE could be

The world's smartest i/o device for Haskell

2000-11-01 Thread Jan Skibinski
Described in: http://www.numeric-quest.com/haskell/smartest.html Jan ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: I/O Question for Haskell

1999-05-13 Thread Keith Wansbrough
> I don't have very much luck with this question in c.l.f. So I'll try it > here. > [..] > The only change in my example is the use of IO.hugsIsEOF. I looked inot > IO.hs and isEOF is commented out and the comment says not yet > implemented so I use this. But now I can't quit the program. I work

I/O Question for Haskell

1999-05-13 Thread Friedrich Dominicus
I don't have very much luck with this question in c.l.f. So I'll try it here. I tried to run a simple program form the book "The craft of Functional Programming" from Simon Thompson, page 392f. Here's my source #!/usr/local/bin/runhugs import System import IO main :: IO () main = while

Re: Referential transparency of I/O

1998-03-17 Thread Kevin Hammond
At 3:37 pm 16/3/98, Patrick Logan wrote: >A discussion about referential transparency and I/O in Haskell popped >up in Comp.lang.scheme. The example was something like: > >do > x <- getLine > y <- getLine > >...with... > >getLine :: IO String > >

Referential transparency of I/O

1998-03-16 Thread Patrick Logan
A discussion about referential transparency and I/O in Haskell popped up in Comp.lang.scheme. The example was something like: do x <- getLine y <- getLine ...with... getLine :: IO String And so my question is what is the value of getLine? I had thought of it as sort of a "plac

I/O in Haskell?

1995-07-03 Thread Alain M. Gaudrault
I tell you, I'm having a really tough time figuring out how to get I/O to work in Haskell. There really is no need to make it so bizarre; one little side-effect wouldn't have hurt Haskell so much, eh? In any case, I'm just trying a simple example: main = wr

Re: New Haskell 1.3 I/O Definition

1994-12-16 Thread Will Partain
most of the world's computers :-( -- and something may have been overlooked. If you are an "expert" about some particular system, *please* give this I/O proposal a good reading! Does the proposal make sense for the system in question? Could it be sort-of-plausibly implemented? Your fe

New Haskell 1.3 I/O Definition

1994-12-14 Thread kh
The revised monadic I/O definition is now available for comment at http://www.dcs.gla.ac.uk/~kh/Haskell1.3/IO.html You should access this using Mosaic or another WWW browser. There is no PostScript version yet. We have tried to address all comments which were sent to us, and have made

Re: Request for comments on the Haskell 1.3 I/O Proposal

1994-09-05 Thread wadler
Some quick comments on the Haskell 1.3 proposal. (1) In the design of Haskell 1.0, the type IOError was a bit of a guess. It wasn't clear whether it defined too many or too few error classes; it might even have been better to just replace IOError by type string. By now, we have more experienc

Request for comments on the Haskell 1.3 I/O Proposal

1994-08-23 Thread Andrew Gordon
Haskell users, As part of the effort to produce version 1.3 of the Haskell report, we (a group of Haskell users and implementors) have drafted a proposal for a portable form of monadic I/O in Haskell. The current version is available at URL http://www.cl.cam.ac.uk/users/adg/io.html

Re: Binary mode I/O

1993-10-13 Thread Lennart Augustsson
> I find that this limits considerably its usage. Can't the Bin representations > of Char, Int, Float and Double (and maybe more) be standardized? I think Haskell Bin stuff is braindamaged and rather useless. I suggest we remove from Haskell until we figure out how to do what that tries to do i

Re: Binary mode I/O

1993-10-13 Thread David M Goblirsch
> I find that this limits considerably its usage. Can't the Bin representations > of Char, Int, Float and Double (and maybe more) be standardized? I think Haskell Bin stuff is braindamaged and rather useless. I suggest we remove from Haskell until we figure out how to do what tha

Binary mode I/O

1993-10-13 Thread Andre Blavier
The Haskell Report says: "Binary mode I/O ensures transparency *within* an implementation". I find that this limits considerably its usage. Can't the Bin representations of Char, Int, Float and Double (and maybe more) be standardized? Ideally, I would like these datatypes to be

user I/O semantics

1993-06-25 Thread Eric Carlson
ening to me for at least 15 years. I remember that > at one time in the early 1980's the famous Chris Terman (he did the > PCC port that SUN Microsystems used to get off the ground) tried to > fix it but gave up when it seemed to require major restructuring. This seems to be a good c

The Glasgow style of I/O

1993-05-12 Thread Duncan Sinclair
I've been playing with the Monadic I/O system set out in Simon and Phil's paper ``Imperative Functional Programming'', and I have built a simple implementation for the Haskell B compiler. (There _is_ a good reason why I didn't just use Glasgow's compiler.)

Haskell I/O

1992-09-15 Thread Shah Namrata Abhaykumar
I am trying to understand I/O in haskell. I have trouble understanding how it is referentially transperant ? Consider a list of four elements [exp1,exp2,exp3,exp4] where exp's are arbitary expressions (of type other than Request). Here one can evaluate expression exp3 without evaluating

Haskell I/O

1992-09-15 Thread Denis Howe
Shah Namrata Abhaykumar <[EMAIL PROTECTED]> is trying to understand I/O in haskell: >Consider a request list, [req1,req2,req3,req4]. This means before >evaluating req3, I should have evaluated req1 and req2. ... >The sequencing is due to the fact that req3 may depend on req1 a

Re: Haskell I/O

1992-09-15 Thread jhf
|From: "Shah Namrata Abhaykumar" <[EMAIL PROTECTED]> |Subject: Haskell I/O | |I am trying to understand I/O in haskell. I have trouble understanding |how it is referentially transperant ? |Consider that main is, | |main resps = [req1,req2,req3,req4] |

Re: Is Haskell I/O system adequate?

1992-08-06 Thread Lennart Augustsson
regarding how convenient it is to write programs; in a theoretical sense almost all languages are equivalent. > I would be very worried if you could write it in Haskell. An > implementation of standard Haskell I/O should preserve referential > transparency, but can you still guarantee t

Re: Is Haskell I/O system adequate?

1992-08-06 Thread Mark . Jones
Junxian J Liu raises the question: | IS THE I/O SYSTEM IN HASKELL ADEQUATE? to which Lennart Augustsson replies: | I think the answer is: NO! | What you want to do cannot be done in Haskell. I don't agree with this. Certainly for the example given, it is possible to

Re: Is Haskell I/O system adequate?

1992-08-03 Thread Lennart Augustsson
> IS THE I/O SYSTEM IN HASKELL ADEQUATE? I think the answer is: NO! What you want to do cannot be done in Haskell. Some people may argue that it should be done in another way, but I think your Miranda solution is perfectly good. If you are more interested in getting a runn

Re: I/O

1992-04-01 Thread Kevin Hammond
Sorry for the delay -- I've been away for a week, without good network connections... > In regard to asynchronous I/O, you said: > > > This applies equally to the request model. Nothing prevents the submission > > (but not necessarily resolution) of a later I/O request d

I/O

1992-03-24 Thread E . Ireland
Kevin, In regard to asynchronous I/O, you said: > This applies equally to the request model. Nothing prevents the submission > (but not necessarily resolution) of a later I/O request during resolution > of an earlier request if those requests are independent (and the request > str

I/O

1992-03-23 Thread E . Ireland
Kevin, In regard to asynchronous I/O, you said: > This applies equally to the request model. Nothing prevents the submission > (but not necessarily resolution) of a later I/O request during resolution > of an earlier request if those requests are independent (and the request > str

Expressiveness of functional language I/O

1992-03-23 Thread E . Ireland
nction satisfying Reynold's > parametricity theorem. See Reynolds' classic 1984 paper, or my > `Theorems for Free'. I did (at least I read Theorems for free). Please explain why the "ref", "deref", and "as

Re: Expressiveness of functional language I/O

1992-03-19 Thread David J.McNally
Evan, I read with interest your mail on polymorphic I/O requests. These are difficult, but can be made easier if you recognise the two checks which are needed for strong typing can be separated. First, some background. Accessing a typed external environment requires an access

I/O

1992-03-19 Thread E . Ireland
Joe, > Regarding efficiency, can someone comment on whether there is any difference > between the stream and continuation models in the effect on parallelism? Parallelism could be ENHANCED by a suitable continuation I/O model, such as the one I am working on (slowly), since with asynchro

Emulating stream I/O with continuation I/O

1992-03-19 Thread E . Ireland
Phil, > Where is there a description of the IO request that lets the > continuation model emulate the stream model??? Here is mine. Nigel will send his. Let (IO a) be the type of I/O requests which can return values of type "a" (after carrying out some I/O action). ref

Re: I/O

1992-03-19 Thread Kevin Hammond
> Joe, > > > Regarding efficiency, can someone comment on whether there is any difference > > between the stream and continuation models in the effect on parallelism? > > Parallelism could be ENHANCED by a suitable continuation I/O model, such as the > one I am work

Expressiveness of functional language I/O

1992-03-19 Thread E . Ireland
Tony, > I thought Paul Hudak's seminal paper 'On the Expressiveness of Purely > Functional I/O Systems' had shown that stream I/O was COMPLETELY equivalent > to continuation I/O. Or is the emphasis above to be taken to be on the word > 'efficiently'? Consid

Re: I/O

1992-03-19 Thread N . Perry
In response to Tony Davies question: Whether continuation & stream I/O are equally expressive I'm not actually sure, I have been told they're not & that continuation is more so - but I don't know they argument, however certain things are definitely a LOT easier usin

  1   2   >