
Hi David, I assume the warnings you are referring to in the subject are incomplete pattern matches? Catch has generated a proof that the pattern-match warnings are completely spurious. Also note that things like "head []" don't generate pattern-match warnings, despite being completely _|_. Perhaps {-# OPTIONS_GHC -fnowarn-pattern-match #-} is sensible to add, given you know its safe anyway. If the reason is to make the code cleaner, then its still a good idea, of course. Thanks Neil
type Stack a = Maybe (NonEmptyStack a) data NonEmptyStack a = Node { focus :: !a -- focused thing in this set , left :: [a] -- clowns to the left , right :: [a] } -- jokers to the right
Then (modify Empty f) could just be (fmap f), and (modify d f) becomes (Just . maybe d . fmap f), which seems cleaner to me. This also allows nice use of pattern matching in the Maybe monad.
I like Maybe. -- David Roundy Department of Physics Oregon State University _______________________________________________ Xmonad mailing list Xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad