Re: Limiting resources on a per-function basis?

2004-01-05 Thread Ketil Malde
Jeff Newbern <[EMAIL PROTECTED]> writes: > Thanks for your input. I am mainly interested in this functionality to > enhance my unit tests. I want to be able to run test cases with limits > on time, heap, stack, etc. and fail the test if it exceeds the limits. Well, if you can isolate the tests

Re: Limiting resources on a per-function basis?

2004-01-02 Thread Glynn Clements
Andreas Bauer wrote: > > I would really like to be able to set resource limits on a per-function > > basis. I am envisioning something like: > > > > limit :: l -> (a -> b) -> (a -> Maybe b) > > limit lim fn = ... > > > > which would convert a function so that it returns Nothing if a limit > >

Re: Limiting resources on a per-function basis?

2004-01-02 Thread Jeff Newbern
Alastair, Thanks for your input. I am mainly interested in this functionality to enhance my unit tests. I want to be able to run test cases with limits on time, heap, stack, etc. and fail the test if it exceeds the limits. I think for this application it is acceptable for limit to introduce a st

Re: Limiting resources on a per-function basis?

2004-01-02 Thread Alastair Reid
> I would really like to be able to set resource limits on a per-function > basis. I am envisioning something like: > > limit :: l -> (a -> b) -> (a -> Maybe b) > limit lim fn = ... > > which would convert a function so that it returns Nothing if a limit > (on stack, heap, time, etc.) is exceeded

Re: Limiting resources on a per-function basis?

2004-01-02 Thread Andreas Bauer
On Fri, Jan 02, 2004 at 10:07:05PM +1000, Jeff Newbern wrote: > I would really like to be able to set resource limits on a per-function > basis. I am envisioning something like: > > limit :: l -> (a -> b) -> (a -> Maybe b) > limit lim fn = ... > > which would convert a function so that it retur

Limiting resources on a per-function basis?

2004-01-02 Thread Jeff Newbern
Hi all, I would really like to be able to set resource limits on a per-function basis. I am envisioning something like: limit :: l -> (a -> b) -> (a -> Maybe b) limit lim fn = ... which would convert a function so that it returns Nothing if a limit (on stack, heap, time, etc.) is exceeded durin