On 14 April 2011 00:52, <blackcat@pro-ns.net> wrote:
Pattern matching works in ghci:

let x = Just (Left (Blah [stuff]))
let (Just (Left (Blah y)) = x

Thanks! That's exactly what I'm looking for.

FWIW there is also Data.Either which has the either function.

λ> :t either
either :: (a -> c) -> (b -> c) -> Either a b -> c

Quite useful sometimes.