[darcs-devel] Re: darcs patch: added autonaming of attachment
created by send
Juliusz Chroboczek
Juliusz.Chroboczek at pps.jussieu.fr
Thu Dec 15 07:46:03 PST 2005
> It was already filtering out special characters.
Ah, sorry.
> +validFileChar char = isAlpha char || isDigit char || char == '_'
So here you filter out everything including dashes...
> + where name = map (\c -> if validFileChar c then toLower c else '-') summary
...which you then replace with dashes.
It does work, but I find it confusing (I'm probably slower at reading
Haskell than most, but I did need to read your patch twice before I
worked out what happens to dashes).
If you have time to restructure this, I'd appreciate it. Perhaps the
lambda expression should become a standalone function with a set of
guarded patterns? But if not, I'll just commit it as it stands.
Juliusz
More information about the darcs-devel
mailing list