Apologies for the empty post. You might turn your attention to the following web page, which approaches the problem using recursive co-routines. Amidst a discussion of UNIX pipes, both in history and as a primitive co-routine implementation, there is a two-line Haskell program. http://www.cs.dartmouth.edu/~doug/sieve/ -----Original Message----- From: "beginners-request@haskell.org" <beginners-request@haskell.org> Sent: 5/5/2016 11:10 AM To: "beginners@haskell.org" <beginners@haskell.org> Subject: Beginners Digest, Vol 95, Issue 8 Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-request@haskell.org You can reach the person managing the list at beginners-owner@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Re: Timed Profiling (Vale Cofer-Shabica) 2. Re: Infinite recursion in list comprehension (Silent Leaf) 3. Re: Infinite recursion in list comprehension (Silent Leaf) ---------------------------------------------------------------------- Message: 1 Date: Thu, 5 May 2016 10:38:50 -0400 From: Vale Cofer-Shabica <vale.cofershabica@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] Timed Profiling Message-ID: <CAAzfV4Rse76Yw8Vq_Mqny_cFRw_9_FFcXBAAm4W+54zXWTuveQ@mail.gmail.com> Content-Type: text/plain; charset="utf-8" timeout(1) allows you to specify the signal(7) sent with the --signal option. It may be worth experimenting with different values. One of them might terminate the program while allowing it to clean up and generate profiling information. I don't know enough about the haskell runtime to know. -vale -- vale cofer-shabica 401.267.8253 On Wed, May 4, 2016 at 7:06 PM, Tim Perry <tim.v2.0@gmail.com> wrote:
I believe that timeout sends a kill signal to the process in question. I imagine that the process is killed before the profiling information is written and so you get an empty file. When you close the program with alt-F4, the program gets a chance to shut down cleanly and writes on the profiling information (.prof)
On Wed, May 4, 2016 at 9:11 AM, Ben Rogalski <bwrogalski@gmail.com> wrote:
I would like to generate a time and allocation profiling report after running my program for exactly 60 seconds (on Ubuntu Linux).
I compiled with the following flags:
-rtsopts -auto-all -caf-all -fforce-recomp
I then ran the program:
The program stops after 60 seconds, but the .prof file is empty.
When I run the program without using timeout, and close it manually (Alt F4, it is a graphical program), the .prof file contains the information I would expect.
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
participants (1)
-
Peter McIlroy