<br><br><div><span class="gmail_quote">2006/10/10, David Roundy <<a href="mailto:droundy@darcs.net">droundy@darcs.net</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>>declassify :: Secret a -> String -> Maybe a<br>>declassify (Secret pw x) pw' | pw' == pw = Just x<br>>declassify (Secret _ _) _ = Nothing</blockquote></div><br>Why does this works? "Yet Another Haskell Tutorial" teaches that pattern matching occurs at one stage and guard processing at other, and that there's no back (page 94).
<br clear="all"><br>-- <br>Felipe.