Re: [Haskell-cafe] tplot (out of memory)

2012-09-04 Thread Arnaud Bailly
Hi, Manish Trivedi trivman...@gmail.com writes: I am running into a weird out of memory issue. While running timeplot over an input file having ~800 rows. From below provided info, seems like machine has enough ram (1849MB). Please let me know if anyone has pointers. I have run tplot on much

Re: [Haskell-cafe] Asking for advice on programming style and also performance

2012-09-04 Thread Joachim Breitner
Hi, Am Montag, den 03.09.2012, 18:31 +0200 schrieb Harald Bögeholz: I would greatly appreciate advice from experienced Haskellers why this has happened. The program is hosted on github; this is the direct link to the change with unexpected outcome:

Re: [Haskell-cafe] Over general types are too easy to make.

2012-09-04 Thread Andreas Abel
I agree with Timothy. In the Agda code base, we have many occurrences of Timothy's pattern aux (OneSpecificConstructor args) = ... aux _ = __IMPOSSIBLE__ where __IMPOSSIBLE__ generates code to throw an internal error. A finer type analysis that treats each

[Haskell-cafe] From monads to monoids in a small category

2012-09-04 Thread Alberto G. Corona
Monads are monoids in the category of endofunctors This Monoid instance for the endofunctors of the set of all elements of (m a) typematch in Haskell with FlexibleInstances: instance Monad m = Monoid (a - m a) where mappend = (=) -- kleisly operator mempty = return The article can

Re: [Haskell-cafe] tplot (out of memory)

2012-09-04 Thread Eugene Kirpichov
Hi Manish, Please provide the input file, I'll debug this. On Mon, Sep 3, 2012 at 1:06 PM, Manish Trivedi trivman...@gmail.com wrote: Hi, I am running into a weird out of memory issue. While running timeplot over an input file having ~800 rows. From below provided info, seems like machine

Re: [Haskell-cafe] From monads to monoids in a small category

2012-09-04 Thread Kristopher Micinski
Your post feels similar to another one posted recently... http://web.jaguarpaw.co.uk/~tom/blog/2012/09/02/what-is-a-monad-really.html just fyi, :-), kris On Tue, Sep 4, 2012 at 6:39 AM, Alberto G. Corona agocor...@gmail.com wrote: Monads are monoids in the category of endofunctors This

Re: [Haskell-cafe] From monads to monoids in a small category

2012-09-04 Thread Alberto G. Corona
Not to mention the ugly formatting ;) 2012/9/5 Richard O'Keefe o...@cs.otago.ac.nz: On 4/09/2012, at 10:39 PM, Alberto G. Corona wrote: Monads are monoids in the category of endofunctors This Monoid instance for the endofunctors of the set of all elements of (m a) typematch in Haskell

Re: [Haskell-cafe] From monads to monoids in a small category

2012-09-04 Thread Alexander Solla
On Tue, Sep 4, 2012 at 3:39 AM, Alberto G. Corona agocor...@gmail.comwrote: Monads are monoids in the category of endofunctors This Monoid instance for the endofunctors of the set of all elements of (m a) typematch in Haskell with FlexibleInstances: instance Monad m = Monoid (a - m a)

Re: [Haskell-cafe] From monads to monoids in a small category

2012-09-04 Thread Alexander Solla
On Tue, Sep 4, 2012 at 4:21 PM, Alexander Solla alex.so...@gmail.comwrote: On Tue, Sep 4, 2012 at 3:39 AM, Alberto G. Corona agocor...@gmail.comwrote: Monads are monoids in the category of endofunctors This Monoid instance for the endofunctors of the set of all elements of (m a)

Re: [Haskell-cafe] Over general types are too easy to make.

2012-09-04 Thread Alvaro Gutierrez
On Tue, Sep 4, 2012 at 5:14 AM, Andreas Abel andreas.a...@ifi.lmu.de wrote: I agree with Timothy. In the Agda code base, we have many occurrences of Timothy's pattern aux (OneSpecificConstructor args) = ... aux _ = __IMPOSSIBLE__ where __IMPOSSIBLE__

Re: [Haskell-cafe] SYB with class: Bug in Derive.hs module

2012-09-04 Thread Andrea Vezzosi
I've pushed the discussed changes to the repo[1], it'd be good if you (and other users) could test them before they get to hackage. [1] darcs get http://patch-tag.com/r/Saizan/syb-with-class/ -- Andrea ___ Haskell-Cafe mailing list

[Haskell-cafe] How to waitForProcess?

2012-09-04 Thread Magicloud Magiclouds
Hi, I have code like this and it leaves lots of zombies of flow-export. Then I add waitForProcess Well I do not know where to put it. Before or after 'hGetContents' both make the program hung. exportCSV :: FilePath - IO [String] exportCSV file = do csv_ - withBinaryFile file ReadMode $ \i

Re: [Haskell-cafe] How to waitForProcess?

2012-09-04 Thread Ivan Lazar Miljenovic
On 5 September 2012 13:45, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi, I have code like this and it leaves lots of zombies of flow-export. Then I add waitForProcess Well I do not know where to put it. Before or after 'hGetContents' both make the program hung. You're

Re: [Haskell-cafe] How to waitForProcess?

2012-09-04 Thread Mike Ledger
You might have to use hGetContents, then waitForProcess, and then terminateProcess -- you can then check if the process is indeed terminated using getProcessExitCode. On Wed, Sep 5, 2012 at 1:45 PM, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi, I have code like this and it

Re: [Haskell-cafe] How to waitForProcess?

2012-09-04 Thread Magicloud Magiclouds
Forgot about that, just read 'readProcess' code to figure out. Thanks. On Wed, Sep 5, 2012 at 12:37 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 5 September 2012 13:45, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi, I have code like this and it leaves lots

Re: [Haskell-cafe] How to waitForProcess?

2012-09-04 Thread Brandon Allbery
On Tue, Sep 4, 2012 at 9:39 PM, Mike Ledger eleventyn...@gmail.com wrote: You might have to use hGetContents, then waitForProcess, and then terminateProcess -- you can then check if the process is indeed terminated using getProcessExitCode. Er? When waitForProcess returns the process is