Re: Typesafe MRef with a regular monad

2003-06-12 Thread Ashley Yakeley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Carl R. Witty) wrote: > Here's a hand-waving argument that you need either Typeable (or > something else that has a run-time concrete representation of types) > or ST/STRef (or something else, probably monadic, that can track > unique objects) to

Re: Typesafe MRef with a regular monad

2003-06-12 Thread Carl R. Witty
"Simon Peyton-Jones" <[EMAIL PROTECTED]> writes: > | Conjecture: It's impossible to implement RefMonad directly in Haskell > | without making use of built-in ST or IO functionality and without > unsafe or > | potentially diverging code (such as unsafeCoerce). > > A more concrete way to formulate

a dream of databases

2003-06-12 Thread John Meacham
so, I have been wanting to implement serialize to database functionality for haskell in a certain way which may or may not be possible.. what would be nice is if I could dump an entire complex haskell data structure (perhaps cyclic, but not infinite) to a hash-table database (like berkeley db). p

Re: IOError

2003-06-12 Thread Wolfgang Jeltsch
On Thursday, 2003-06-12, 21:02, CEST, Dean Herington wrote: > On Thu, 12 Jun 2003, Wolfgang Jeltsch wrote: > > [...] You can then examine t as in the following example: > > t <- try (hGetLine h1) > > case t of > > Left error | isEOFError error > > -> do > > Righ

Re: IOError

2003-06-12 Thread Dean Herington
On Thu, 12 Jun 2003, Wolfgang Jeltsch wrote: > On Thursday, 2003-06-12, 18:01, CEST, Filip wrote: > > Hi, > > > > I wrote something like "let t = try (hGetLine h1)" and I would like to check > > is it EOFError or not. How can I do this ?? > > > > Thanks > > Hello, > > the above code assigns the

Re: problems with working with Handles

2003-06-12 Thread Dean Herington
On Thu, 12 Jun 2003, Niels Reyngoud wrote: > Hello, > > We're two students from the department of computer science at the > University of Utrecht (the Netherlands), and we're havind some severe > difficulties in working > with file handles in Haskell. Consider for example the following program

Re: problems with working with Handles

2003-06-12 Thread Keith Wansbrough
> Hello, > > We're two students from the department of computer science at the > University of Utrecht (the Netherlands), and we're havind some severe > difficulties in working > with file handles in Haskell. Consider for example the following program: > > main = do --let inputfile = "input.t

RE: problems with working with Handles

2003-06-12 Thread Markus . Schnell
> main = do --let inputfile = "input.txt" > let inputtext = "testit" > let outputfile = "output.txt" > writeFile outputfile "" > handle2 <- openFileEx outputfile (BinaryMode WriteMode) > hPutStr handle2 (inputtext ++ " extra") > > handle3 <- openFil

Re: problems with working with Handles

2003-06-12 Thread Hal Daume III
I believe this is related to the topic discussed a few weeks ago. See http://haskell.org/pipermail/haskell/2003-May/011851.html and responses. At least, this is most likely the curprit of your second problem. I'm not so sure about the first one. I would expect "testit extratestit extra2" to

Re: IOError

2003-06-12 Thread Wolfgang Jeltsch
On Thursday, 2003-06-12, 18:01, CEST, Filip wrote: > Hi, > > I wrote something like "let t = try (hGetLine h1)" and I would like to check > is it EOFError or not. How can I do this ?? > > Thanks Hello, the above code assigns the I/O action try (hGetLine h1) to t. I suppose you want to assign

problems with working with Handles

2003-06-12 Thread Niels Reyngoud
Hello, We're two students from the department of computer science at the University of Utrecht (the Netherlands), and we're havind some severe difficulties in working with file handles in Haskell. Consider for example the following program: main = do --let inputfile = "input.txt" let in

IOError

2003-06-12 Thread Filip
Hi, I wrote something like "let t = try (hGetLine h1)" and I would like to check is it EOFError or not. How can I do this ?? Thanks ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell