On Jul 22, 2008, at 13:18 , L29Ah wrote:

outStanza | (isMessage) = outMessage
            | (isPresence) = outPresence
            | (isIQ) = outIQ

Why such a style doesn't work, so I must write ugly code like that:


Because the Haskell 98 Report specifies that guards are rewritten in a specific way, which in your case produces invalid code. See http://haskell.org/onlinereport/decls.html#pattern-bindings for details.

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university    KF8NH


_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to