On Thu, 1 Jan 2004 23:19:26 + (GMT)
James Ealing <[EMAIL PROTECTED]> wrote:
> I'm trying to make use of the combinatorial parsing
> library to process strings. However, I can't figure
> out the correct syntax for the (|||) (^^^) (>>>) (<^^)
> and (^^>) functions. Can anyone see how to do it?
On Thu, 1 Jan 2004 21:07:00 -0500
[EMAIL PROTECTED] wrote:
> > (6) I have found that Haskell seems to a particularly effective
> > platform for pursuing some ideas of extreme programming,
>
> There you go. :-)
>
> There is only one problem I've found with test-driven development in
> Haskell.
On Fri, Jan 02, 2004 at 02:54:11AM +, James Ealing wrote:
> Hi all,
>
> If I have a function:
>
> it f [a0, a1, a2, ...] = [a0, f a1, f (f a2), ...]
>
> Is there any way of expressing
>
> it f
>
> as an instance of foldr?
You can write it as
it1 f l = foldr (\x xs -> x : map f xs) [] l
b
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
On 2004-01-01 at 21:07EST [EMAIL PROTECTED] wrote:
> There is only one problem I've found with test-driven development in
> Haskell. In C++, it's possible to break the "module" abstraction
> (yes, I know, C++ doesn't have modules; it has classes, which are really
> instantiable modules) by using
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
At 15:37 31/12/03 +, Joe Thornber wrote:
On Wed, Dec 31, 2003 at 02:38:06PM +, Graham Klyne wrote:
> getOrCachePositionValue pos =
> do { mcache <- gets (findPos pos) -- Query cache for position
>; case mcache of
>Just cached -> return (cachedVal cached) -- Ret
> 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
On Fri, Jan 02, 2004 at 02:46:04PM +, Graham Klyne wrote:
> If your calculation really needs to update the cache state as it goes
> along, then I agree that it needs to be run in the state monad. But even
> then, I'd be inclined to look for sub-calculations that can be evaluated as
> ordina
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
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
> >
11 matches
Mail list logo