ANN: H98 FFI Addendum 1.0, Release Candidate 11

2003-06-11 Thread Manuel M T Chakravarty
Dear Haskell Folks, Release Candidate 11 of the H98 FFI Addendum 1.0 is now available from http://www.cse.unsw.edu.au/~chak/haskell/ffi/ The change log since RC 10 is appended below. Again, please review this specification carefully. If no suggestion that leads to a serious change is made wi

Re: ANN: H98 FFI Addendum 1.0, Release Candidate 10

2003-06-11 Thread Manuel M T Chakravarty
Ross Paterson <[EMAIL PROTECTED]> wrote, > > Great care should be exercised in the use of this function. Not only > > because of the danger of introducing side effects, but also because > > \code{unsafePerformIO} may compromise typing; in particular, the result of > > \code{unsafePerformIO} shoul

Re: ANN: H98 FFI Addendum 1.0, Release Candidate 10

2003-06-11 Thread Manuel M T Chakravarty
John Hughes <[EMAIL PROTECTED]> wrote, > "should always have" is unfortunately ambiguous: does it mean "you should > ensure that...", or "we believe that..., but we're not completely sure". I > suggest changing the last phrase to > > ...; to avoid this, the programmer should ensure that the resul

Re: Stupid wuestion about Monads :)

2003-06-11 Thread Marc Ziegert
google: "What the hell are Monads" http://www.abercrombiegroup.co.uk/~noel/research/monads.html IO in haskell is really easy, iff you understand the sense of monads. to understand sth. like "IO Bool" you have to remember that i.e. an array is no defined data type without the definition of its e

Re: LOOP + HANDLE

2003-06-11 Thread Glynn Clements
Filip wrote: > So how to write function that will wait until Handle is ready for reading ?? hWaitForInput :: Handle -> Int -> IO Bool hWaitForInput h t = ... Waits until Handle h is ready for reading or t milliseconds have elapsed. -- Glynn Clements <[EMAIL PROTECTED]> ___

Re: Stupid wuestion about Monads :)

2003-06-11 Thread Wolfgang Jeltsch
On Wednesday, 2003-06-11, 20:00, Filip wrote: > I have a question :) > What should I do if I have something like "IO Bool" and I need "Bool" ?? > And the same with other IO +something. This is a question which arises very often on this list. I think, you should read a tutorial like the Gentle Int

Re: LOOP + HANDLE

2003-06-11 Thread Wolfgang Jeltsch
On Wednesday, 2003-06-11, 18:54, Filip wrote: > So how to write function that will wait until Handle is ready for reading ?? It would be very bad to use a while loop for this like while (!is_ready(handle)) /* do nothing */; which is called active waiting. Your processor is busy all the time do

Re: Stupid wuestion about Monads :)

2003-06-11 Thread Nick Name
On Wed, 11 Jun 2003 20:00:00 +0200 Filip <[EMAIL PROTECTED]> wrote: > What should I do if I have something like "IO Bool" and I need "Bool" IO Bool means "an action that can perform IO and returns a Bool". You can't get a Bool without performing IO with that function, so you can't get a Bool from

Re: Stupid wuestion about Monads :)

2003-06-11 Thread Derek Elkins
On Wed, 11 Jun 2003 20:00:00 +0200 Filip <[EMAIL PROTECTED]> wrote: > I have a question :) > What should I do if I have something like "IO Bool" and I need "Bool" > ?? Read the "Gentle Introduction" http://www.haskell.org/tutorial/ ___ Haskell mailing

Re: Typesafe MRef with a regular monad

2003-06-11 Thread Derek Elkins
On Wed, 11 Jun 2003 09:19:46 +0200 (MET DST) Koen Claessen <[EMAIL PROTECTED]> wrote: > Derek Elkins wrote: > > | The question (at least to me) is more, 'you can > | satisfy the RefMonad interface with STRefs or IORefs, > | but those use "imperative" features under the hood; > | can it be sat

Re: Stupid wuestion about Monads :)

2003-06-11 Thread Hal Daume III
Look through the mailing list archives/wiki/haskell tutorials. But basically you can't, except by combining it with another action, as in: suppose 'baz :: Int -> IO Bool', then: foo = do bar <- baz 5 if bar then ... else ... for instance... -- Hal Daume III

Stupid wuestion about Monads :)

2003-06-11 Thread Filip
I have a question :) What should I do if I have something like "IO Bool" and I need "Bool" ?? And the same with other IO +something. Thank You :) ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: LOOPS

2003-06-11 Thread Tomasz Zielonka
On Wed, Jun 11, 2003 at 09:39:24AM -0700, Hal Daume III wrote: > It depends how much you mean "like" :). Usually whatever you would solve > using a while loop in an imperative language is solved with recursion in > Haskell. > > The problem with directly having 'while' is that such a statement > d

LOOP + HANDLE

2003-06-11 Thread Filip
So how to write function that will wait until Handle is ready for reading ?? And is there something like "if" ?? ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: LOOPS

2003-06-11 Thread Hal Daume III
It depends how much you mean "like" :). Usually whatever you would solve using a while loop in an imperative language is solved with recursion in Haskell. The problem with directly having 'while' is that such a statement depends necessarily on mutable variables (otherwise, if the condition is 'tr

LOOPS

2003-06-11 Thread Filip
I have a stupid question :) Is there something like "while" loop in GHC ?? Thanks very much :) ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

LOOPS

2003-06-11 Thread Filip
I have a stupid question :) Is there something like "while" loop in GHC ?? Thanks very much :) ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

CFP: Soft-2003 - WS on Soft Constraints

2003-06-11 Thread Stefano Bistarelli
===  5th International Workshop on Soft Constraints  Held in conjunction with   9th International Conference on   Principles and Practice of Constraint Programming, CP2003  Actons Hot

Call for organizers: The 5th Advanced Functional Programming School, 2004

2003-06-11 Thread Johan Jeuring
Call for organizers: The Advanced Functional Programming School, 2004 http://www.cs.uu.nl/~johanj/afp/ We solicit plans for organizing the next Advanced Functional Programming School. Since 1995 there have been four Schools on Advanced Functional Programming in * 2002, LNCS 2638, Oxford,

Re: Typesafe MRef with a regular monad

2003-06-11 Thread Koen Claessen
Someone asked me: | I don't recall the message you are referring to, and I | can't find it in the archive. Can you point me at it? Sorry, I meant: http://www.haskell.org/pipermail/haskell/2001-September/007922.html /K :-) ___ Haskell mailing list

Re: Typesafe MRef with a regular monad

2003-06-11 Thread Koen Claessen
Derek Elkins wrote: | The question (at least to me) is more, 'you can | satisfy the RefMonad interface with STRefs or IORefs, | but those use "imperative" features under the hood; | can it be satisfied without them?' As I showed in the message that spawned off this discussion, this is indeed