Hi David,

The second patch seems to change behaviour.  I will wait for further
comments before pushing :-)

change is_file to return false on [EMAIL PROTECTED]:
----------------------------------------------------
> -match_not_file = mkRegex "..+:.+"
> +match_not_file = mkRegex "..+:"

Seems harmless enough

refactor Darcs.URL to eliminate use of Regexes.
-----------------------------------------------
Reordering some lines.  Removing needless regexp use seems like a nice
idea.

> -match_not_file = mkRegex "..+:"
> -is_file fou = isNothing $ matchRegex match_not_file fou
> +is_file :: String -> Bool
> +is_file (_:_:fou) = ':' `notElem` fou
> +is_file _ = True

Indeed, this does appear to be unchanged.

I was wondering for a while why we seem to assume that hostnames are at
least two letters long, but then it struck me that this must be because
we want to recognise Windows drive names (e.g. C:) as being such.  IF
so, this is exactly the kind of thing we ought to haddock.

> -match_url = mkRegex ".+://.+"
> +is_url :: String -> Bool
> +is_url (':':'/':'/':_) = True
> +is_url (_:x) = is_url x
> +is_url "" = False

It looks like there is a small change in this function.

Before, we rejected
  foo://
because it was missing a character at the end.  Now we accept it.

I'm guessing this doesn't really matter, but just in case, I am
going to wait until you comment before pushing into stable.

> -match_ssh_nopath = mkRegex "^[^:]{2,}:$"
> -is_ssh_nopath s = isJust $ matchRegex match_ssh_nopath s
> +is_ssh_nopath :: String -> Bool
> +is_ssh_nopath s = case reverse s of
> +                  ':':x@(_:_:_) -> ':' `notElem` x
> +                  _ -> False

Seems the same to me.

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9

Attachment: pgpERSUKE7eLS.pgp
Description: PGP signature

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to