Excerpts from Edward Amsden's message of Wed Jan 26 15:51:46 -0500 2011:
> do
> ...
> case ... of
> Foo x -> do ...
>                   ...
>                   return foobar
> Bar x -> do ...
>                  ...
>                  return foobar

There's not enough context here to say what is appropriate.
Is foobar defined in the outer or inner do-block?

> if cond
>   then throwError "BBQ!"
>   else do
>          ...
>          ...
>          return ...

Try:

    when cond $ throwError "BBQ!"
    ...
    ...
    return ...

Cheers,
Edward

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to