How about this approach ?
I think this is a conventional and clear way,
though Flag Verbose has a verbose String.
-----
import Data.List
import Data.Maybe
data Flag = Flag FlagType String
deriving Show
getFlagType (Flag ft _) = ft
data FlagType = Verbose | Input | Output | Filter
deriving (Show, Eq)
findFlag f@(Flag ft _) xs = fromMaybe f (find ((ft ==).getFlagType) xs)
-- instance Eq Flag where
-- Flag ft1 _ == Flag ft2 _ = ft1 == ft2
----
--
Koji Nakahara
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe