Skip to content
Snippets Groups Projects
Commit 1ecf3fd2 authored by batterseapower's avatar batterseapower
Browse files

Merge branch 'master' of ssh://darcs.haskell.org/srv/darcs/ghc

parents 3deca8f4 9330f8d0
No related branches found
No related tags found
No related merge requests found
...@@ -43,13 +43,13 @@ while (<PACKAGES>) { ...@@ -43,13 +43,13 @@ while (<PACKAGES>) {
# If $tag is not "-" then it is an optional repository, so its # If $tag is not "-" then it is an optional repository, so its
# absence isn't an error. # absence isn't an error.
if (defined($required_tag{$tag})) { if (defined($required_tag{$tag})) {
# We would like to just check for an _darcs directory here, # We would like to just check for a .git directory here,
# but in an lndir tree we avoid making _darcs directories, # but in an lndir tree we avoid making .git directories,
# so it doesn't exist. We therefore require that every repo # so it doesn't exist. We therefore require that every repo
# has a LICENSE file instead. # has a LICENSE file instead.
if (! -f "$dir/LICENSE") { if (! -f "$dir/LICENSE") {
print STDERR "Error: $dir/LICENSE doesn't exist.\n"; print STDERR "Error: $dir/LICENSE doesn't exist.\n";
die "Maybe you haven't done './darcs-all get'?"; die "Maybe you haven't done './sync-all get'?";
} }
} }
} }
...@@ -70,10 +70,3 @@ foreach $dir (".", glob("libraries/*/")) { ...@@ -70,10 +70,3 @@ foreach $dir (".", glob("libraries/*/")) {
} }
} }
# Alas, darcs doesn't handle file permissions, so fix a few of them.
for my $file ("boot", "darcs-all", "validate") {
if (-f $file) {
chmod 0755, $file
or die "Can't chmod 0755 $file: $!";
}
}
...@@ -25,6 +25,9 @@ for $tarball (@tarballs) { ...@@ -25,6 +25,9 @@ for $tarball (@tarballs) {
if (-d "libraries/$package/_darcs") { if (-d "libraries/$package/_darcs") {
print "Ignoring libraries/$package as it looks like a darcs checkout\n" print "Ignoring libraries/$package as it looks like a darcs checkout\n"
} }
elsif (-d "libraries/$package/.git") {
print "Ignoring libraries/$package as it looks like a git checkout\n"
}
else { else {
if (! -d "libraries/stamp") { if (! -d "libraries/stamp") {
mkdir "libraries/stamp"; mkdir "libraries/stamp";
......
...@@ -245,11 +245,18 @@ dataConInfoPtrToName x = do ...@@ -245,11 +245,18 @@ dataConInfoPtrToName x = do
where where
(modWords, occWord) = ASSERT (length rest1 > 0) (parseModOcc [] (tail rest1)) (modWords, occWord) = ASSERT (length rest1 > 0) (parseModOcc [] (tail rest1))
parseModOcc :: [[Word8]] -> [Word8] -> ([[Word8]], [Word8]) parseModOcc :: [[Word8]] -> [Word8] -> ([[Word8]], [Word8])
parseModOcc acc str -- We only look for dots if str could start with a module name,
-- i.e. if it starts with an upper case character.
-- Otherwise we might think that "X.:->" is the module name in
-- "X.:->.+", whereas actually "X" is the module name and
-- ":->.+" is a constructor name.
parseModOcc acc str@(c : _)
| isUpper $ chr $ fromIntegral c
= case break (== dot) str of = case break (== dot) str of
(top, []) -> (acc, top) (top, []) -> (acc, top)
(top, _:bot) -> parseModOcc (top : acc) bot (top, _ : bot) -> parseModOcc (top : acc) bot
parseModOcc acc str = (acc, str)
-- | Get the 'HValue' associated with the given name. -- | Get the 'HValue' associated with the given name.
-- --
-- May cause loading the module that contains the name. -- May cause loading the module that contains the name.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment