Just wanted to mention (in case anyone noticed) that there is an error in
the following code:

>         errQ :: [Robust r e] -> [r] -> Robust [r] e
>         errQ (OK x:xs)    acc = errQ xs (x : acc)
>         errQ (Throw x:xs) acc = throw x
>         errQ []           acc = ok acc

  It will reverse the list during the accumulation.  The following code is
correct and keeps the order stable, although it isn't tail-recursive...

>         errQ   :: [Robust r e] -> Robust [r] e
>         errQ (OK x:xs)    = errQ xs ==> \xs' -> ok (x:xs')
>         errQ (Throw x:xs) = throw x
>         errQ []           = ok []

  where ==> is the `bind' operator in the exception monad.

Frank Christoph
[EMAIL PROTECTED]


Reply via email to