[Haskell-cafe] Neither of the sparks are converted into OS threads but parallelization happens surprisingly!!!

2011-12-07 Thread Burak Ekici
Dear List, I have a point misunderstood! I am using second generation strategies of Haskell to parallelize some number of algorithms in Haskell. The missing point here is that: In some cases, neither of created sparks are converted into OS threads, but parallelization happens surprisingly,

Re: [Haskell-cafe] More liberal than liberal type synonyms

2011-12-07 Thread Dmitry Kulagin
Hi Dan, I am still pretty new in Haskell, but this problem annoys me already. If I define certain monad as a type synonym: type StateA a = StateT SomeState SomeMonad a Then I can't declare new monad based on the synonym: type StateB a = StateT SomeOtherState StateA a The only way I

Re: [Haskell-cafe] More liberal than liberal type synonyms

2011-12-07 Thread Øystein Kolsrud
You should be able to write something like this: type StateB a b = StateT SomeOtherState (StateA a) b Best regards, Øystein Kolsrud On Wed, Dec 7, 2011 at 11:48 AM, Dmitry Kulagin dmitry.kula...@gmail.comwrote: Hi Dan, I am still pretty new in Haskell, but this problem annoys me already.

Re: [Haskell-cafe] More liberal than liberal type synonyms

2011-12-07 Thread Dmitry Kulagin
You should be able to write something like this: type StateB a b = StateT SomeOtherState (StateA a) b Thank you for reply, but this variant actually does not compile: StateA and (StateA a) have different kinds. Dmitry Best regards, Øystein Kolsrud On Wed, Dec 7, 2011 at 11:48 AM, Dmitry

Re: [Haskell-cafe] More liberal than liberal type synonyms

2011-12-07 Thread Yves Parès
This is impossible: in the definition of 'StateT s m a', m must be a monad and then have the * - * kind. So you cannot pass (StateA a), because it has simply the * kind. Dmitry, does your code work with LiberalTypeSynonyms extention activated? 2011/12/7 Øystein Kolsrud kols...@gmail.com You

Re: [Haskell-cafe] More liberal than liberal type synonyms

2011-12-07 Thread Dmitry Kulagin
Dmitry, does your code work with LiberalTypeSynonyms extention activated? No, the same error: Type synonym `StateA' should have 1 argument, but has been given 0 But I have GHC 6.12.3 Dmitry 2011/12/7 Yves Parès limestr...@gmail.com: This is impossible: in the definition of 'StateT s m a', m

[Haskell-cafe] terminateProcess leaves zombie processes around

2011-12-07 Thread Dan Rosén
Hi Haskell-Cafe, I'm using Haskell to run a lot of instances of an Automated Thorem Prover, eprover. I have pasted a smaller version of my program at http://hpaste.org/54954. It runs eprover sequentially on all input files, with a timeout of 100ms. Unfortunately, it leaves a lot of zombie

Re: [Haskell-cafe] More liberal than liberal type synonyms

2011-12-07 Thread Yves Parès
Ah, maybe Dan could tell us if it works only with GHC 7. Dmitry, I had your problem many times. The last time was when I saw you could define the ContT monad in terms of Cont (the opposite is done in the mtl). It leads to a simpler code, but you are stucked when trying to define ContT as an

Re: [Haskell-cafe] More liberal than liberal type synonyms

2011-12-07 Thread Dmitry Kulagin
For short, type synonyms work for mere aliases, but not for full-fledged type-level non-inductive functions. And sometimes we intuitively want to use them as such. Thank you, Yves! It is now more clear for me. Still, it seems that ability to use partially applied type synonyms would be very

Re: [Haskell-cafe] terminateProcess leaves zombie processes around

2011-12-07 Thread Felipe Almeida Lessa
Quick suggestion: did you try using waitForProcess just after terminateProcess? Cheers, -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] PhD position at Ghent University

2011-12-07 Thread Tom Schrijvers
The Programming Languages Group of Ghent University invites applicants for a PhD position. This position centers around the modular treatment of side-effects in purely functional programs and models. It is part of the project Modular handling of effects in purely functional programs and models

Re: [Haskell-cafe] How did iteratees get their names?

2011-12-07 Thread Ertugrul Söylemez
Douglas McClean douglas.mccl...@gmail.com wrote: I love iteratees as a paradigm for IO, but I am having trouble developing a relationship with the names. Could someone explain their origin? It seems like if iteratees consume things, enumerators produce them, andenumeratees do both that

Re: [Haskell-cafe] terminateProcess leaves zombie processes around

2011-12-07 Thread Brandon Allbery
On Wed, Dec 7, 2011 at 06:47, Dan Rosén d...@student.gu.se wrote: I'm using Haskell to run a lot of instances of an Automated Thorem Prover, eprover. I have pasted a smaller version of my program at http://hpaste.org/54954. It runs eprover sequentially on all input files, with a timeout of

Re: [Haskell-cafe] How did iteratees get their names?

2011-12-07 Thread Henrik Nilsson
Hi, Ertugrul wrote: Just like chatter and chattee, employer and employee, there is an iterator (usually as part of an enumerator/ee) and an iteratee. Thanks for the attempt to explain. But I, at least, remain mystified, and I agree with Douglas that the terminology is confusing. Usually,

Re: [Haskell-cafe] terminateProcess leaves zombie processes around

2011-12-07 Thread Felipe Almeida Lessa
On Wed, Dec 7, 2011 at 1:19 PM, Brandon Allbery allber...@gmail.com wrote: They *do* terminate; a zombie is a dead process waiting for its parent to reap it with waitForProcess.  There's also some POSIX stuff you can do to have them auto-reaped, but doing that correctly and portably is somewhat

Re: [Haskell-cafe] terminateProcess leaves zombie processes around

2011-12-07 Thread Brandon Allbery
On Wed, Dec 7, 2011 at 10:27, Felipe Almeida Lessa felipe.le...@gmail.comwrote: On Wed, Dec 7, 2011 at 1:19 PM, Brandon Allbery allber...@gmail.com wrote: They *do* terminate; a zombie is a dead process waiting for its parent to reap it with waitForProcess. There's also some POSIX stuff

Re: [Haskell-cafe] terminateProcess leaves zombie processes around

2011-12-07 Thread Donn Cave
Quoth Felipe Almeida Lessa felipe.le...@gmail.com, On Wed, Dec 7, 2011 at 1:19 PM, Brandon Allbery allber...@gmail.com wrote: They *do* terminate; a zombie is a dead process waiting for its parent to reap it with waitForProcess. There's also some POSIX stuff you can do to have them

Re: [Haskell-cafe] How did iteratees get their names?

2011-12-07 Thread Ertugrul Söylemez
Henrik Nilsson n...@cs.nott.ac.uk wrote: Just like chatter and chattee, employer and employee, there is an iterator (usually as part of an enumerator/ee) and an iteratee. Thanks for the attempt to explain. But I, at least, remain mystified, and I agree with Douglas that the terminology is

Re: [Haskell-cafe] More liberal than liberal type synonyms

2011-12-07 Thread Gábor Lehel
On Wed, Dec 7, 2011 at 1:07 PM, Dmitry Kulagin dmitry.kula...@gmail.com wrote: For short, type synonyms work for mere aliases, but not for full-fledged type-level non-inductive functions. And sometimes we intuitively want to use them as such. Thank you, Yves! It is now more clear for me.

Re: [Haskell-cafe] How did iteratees get their names?

2011-12-07 Thread Henrik Nilsson
Hi Ertugrul, Coroutines actually capture this kind of composition (where some code interrupts itself to hand control over to some other code) very well. Perhaps it would be better to use terms from that abstraction instead. In fact, iteratees are a special case of coroutines. That would

Re: [Haskell-cafe] More liberal than liberal type synonyms

2011-12-07 Thread Dan Doel
On Wed, Dec 7, 2011 at 5:48 AM, Dmitry Kulagin dmitry.kula...@gmail.com wrote: I am still pretty new in Haskell, but this problem annoys me already. If I define certain monad as a type synonym:    type StateA a = StateT SomeState SomeMonad a Then I can't declare new monad based on the

Re: [Haskell-cafe] How did iteratees get their names?

2011-12-07 Thread Ketil Malde
Henrik Nilsson n...@cs.nott.ac.uk writes: Just like chatter and chattee, employer and employee, there is an iterator (usually as part of an enumerator/ee) and an iteratee. Thanks for the attempt to explain. But I, at least, remain mystified, and I agree with Douglas that the terminology is

Re: [Haskell-cafe] terminateProcess leaves zombie processes around

2011-12-07 Thread Dan Rosén
Thank you very much for your answers. Felipe's suggestion to use waitForProcess after terminateProcess did the trick. No more zombies around :) Best regards, Dan Rosén On Wed, Dec 7, 2011 at 4:39 PM, Donn Cave d...@avvanta.com wrote: Quoth Felipe Almeida Lessa felipe.le...@gmail.com, On

Re: [Haskell-cafe] terminateProcess leaves zombie processes around

2011-12-07 Thread Jason Dagit
On Wed, Dec 7, 2011 at 7:19 AM, Brandon Allbery allber...@gmail.com wrote: On Wed, Dec 7, 2011 at 06:47, Dan Rosén d...@student.gu.se wrote: I'm using Haskell to run a lot of instances of an Automated Thorem Prover, eprover. I have pasted a smaller version of my program at

Re: [Haskell-cafe] terminateProcess leaves zombie processes around

2011-12-07 Thread Brandon Allbery
On Wed, Dec 7, 2011 at 20:35, Jason Dagit dag...@gmail.com wrote: They *do* terminate; a zombie is a dead process waiting for its parent to reap it with waitForProcess. There's also some POSIX stuff you can do to have them auto-reaped, but doing that correctly and portably is somewhat

[Haskell-cafe] Why doesn't this work? (palindrome :: IO)

2011-12-07 Thread Alexej Segeda
Hi! A couple of months ago, I wrote an exam in an introductory Haskell course and failed, all because of an assignment that I was convinced would work, but for some reason, it didn't. The assignment was to write a function that would take a line, then determine whether it's a palindrome or

Re: [Haskell-cafe] Why doesn't this work? (palindrome :: IO)

2011-12-07 Thread Brandon Allbery
On Wed, Dec 7, 2011 at 23:24, Alexej Segeda aloscha_den_st...@hotmail.comwrote: case s of (s == reverse s)- putStrLn (s ++ is a palindrome) otherwise - putStrLn (s ++ is not a palindrome) case does pattern matching, not

[Haskell-cafe] Haskell Weekly News: Issue 210

2011-12-07 Thread Daniel Santa Cruz
Welcome to issue 210 of the HWN, a newsletter covering developments in the Haskell community. This release covers the week of November 27 to December 3, 2011. You can find the HTML version at: http://contemplatecode.blogspot.com/2011/12/haskell-weekly-news-issue-210.html Announcements