[Haskell-cafe] Re: Re: Avoiding boilerplate retrieving GetOpt

Eric Kow eric.kow at gmail.com
Fri Jul 27 05:59:30 EDT 2007


> For starters, you could squish these down into something like

> > flagToString :: Flag -> Maybe String
> > flagToString (Filter s) = Just s
> > flagToString (DateFormat s) = Just s
> > ...
> > flagToString _ = Nothing

What am I saying?! This wouldn't work!  Sorry for the noise.

-- 
Eric Kow                     http://www.loria.fr/~kow
PGP Key ID: 08AC04F9         Merci de corriger mon français.


More information about the Haskell-Cafe mailing list