[Haskell] Nested guards?

Taral taralx at gmail.com
Tue Dec 4 18:02:46 EST 2007


On 12/4/07, Roberto Zunino <zunino at di.unipi.it> wrote:
> server text
>    | Just xs <- parse text = let
>      x | "field1" `elem` xs   = error "... do one thing ..."
>        | "field2" `elem` xs   = error "... do something else ..."
>      in x
> server  _ = error "... invalid request ..."

Not the same fallthrough properties. You'd have to clone the "server
_" clause into the x clause.

-- 
Taral <taralx at gmail.com>
"Please let me know if there's any further trouble I can give you."
    -- Unknown


More information about the Haskell mailing list