X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Finterface%2Fgetter.ml;h=85e64117b6be0fe66366d4eaea95c811364e8617;hb=4ef40e8fb4de63f9699268b389f052007bc87f54;hp=d79f395141c0b99ba5c8870e45836bdd14cda128;hpb=5a7ec1a3e9cea3050ad08b2f6f57c0dad2d5a632;p=helm.git diff --git a/helm/interface/getter.ml b/helm/interface/getter.ml index d79f39514..85e64117b 100644 --- a/helm/interface/getter.ml +++ b/helm/interface/getter.ml @@ -54,7 +54,12 @@ let read_index url = let uris = ref [] in try while true do - uris := (input_line fd) :: !uris + let (uri,comp) = + match (Str.split (Str.regexp "[ \t]+") (input_line fd)) with + [uri] -> (uri,"") + | [uri;comp] -> (uri,".gz") + in + uris := (uri,comp) :: !uris done ; [] (* only to make the compiler happy *) with @@ -70,14 +75,14 @@ let rec mk_urls_of_uris = | he::tl -> let map = mk_urls_of_uris tl in let uris = read_index he in - let url_of_uri uri = - let url = uri ^ ".xml" in + let url_of_uri (uri,comp) = + let url = uri ^ ".xml" ^ comp in let url' = Str.replace_first (Str.regexp "cic:") he url in let url'' = Str.replace_first (Str.regexp "theory:") he url' in url'' in List.fold_right - (fun uri m -> MapOfStrings.add uri (url_of_uri uri) m) + (fun (uri,comp) m -> MapOfStrings.add uri (url_of_uri (uri,comp)) m) uris map ;;