History

Update Haskell documentation (7.10.2)

Thibaut committed 11 years ago

Commit b9a038d1 parent 0d496d62 files · +40 −30Browse files

Unified · Split

2 files
  1. lib/docs/filters/haskell/entries.rb +21 −15
  2. lib/docs/scrapers/haskell.rb +19 −15
lib/docs/filters/haskell/entries.rb+21−15
@@ -2,19 +2,25 @@ module Docs · 1 unmodified line
22 class Haskell
33 class EntriesFilter < Docs::EntriesFilter
44 IGNORE_ENTRIES_PATHS = %w(
5− bytestring-0.10.4.0/Data-ByteString-Lazy.html
6− bytestring-0.10.4.0/Data-ByteString-Char8.html
7− bytestring-0.10.4.0/Data-ByteString-Lazy-Char8.html
8− array-0.5.0.0/Data-Array-IArray.html
9− containers-0.5.5.1/Data-IntMap-Lazy.html
10− containers-0.5.5.1/Data-Map-Lazy.html
11− unix-2.7.0.1/System-Posix-Files-ByteString.html
12− filepath-1.3.0.2/System-FilePath-Windows.html
13− transformers-0.3.0.0/Control-Monad-Trans-RWS-Lazy.html
14− transformers-0.3.0.0/Control-Monad-Trans-Writer-Lazy.html
15− base-4.7.0.0/GHC-Conc-Sync.html
16− base-4.7.0.0/GHC-IO-Encoding-UTF32.html
17− unix-2.7.0.1/System-Posix-Terminal-ByteString.html)
5+ Data-ByteString-Lazy.html
6+ Data-ByteString-Char8.html
7+ Data-ByteString-Lazy-Char8.html
8+ Data-Array-IArray.html
9+ Data-IntMap-Lazy.html
10+ Data-Map-Lazy.html
11+ System-Posix-Files-ByteString.html
12+ System-FilePath-Windows.html
13+ Control-Monad-Trans-RWS-Lazy.html
14+ Control-Monad-Trans-State-Lazy.html
15+ Control-Monad-Trans-Writer-Lazy.html
16+ GHC-Conc-Sync.html
17+ GHC-OldList.html
18+ GHC-IO-Encoding-UTF32.html
19+ System-Posix-Terminal-ByteString.html
20+ Text-XHtml-Frameset.html
21+ Text-XHtml-Strict.html
22+ System-Posix-Process-ByteString.html
23+ Data-ByteString-Builder-Prim.html)
1824
1925 def get_name
2026 at_css('#module-header .caption').content.strip
@@ -33,7 +39,7 @@ module Docs · 12 unmodified lines
3339 end
3440
3541 def additional_entries
36− return [] if IGNORE_ENTRIES_PATHS.include?(subpath)
42+ return [] if IGNORE_ENTRIES_PATHS.include?(subpath.split('/').last)
3743
3844 css('#synopsis > ul > li').each_with_object [] do |node, entries|
3945 link = node.at_css('a')
@@ -41,7 +47,7 @@ module Docs · 1 unmodified line
4147 name = node.content.strip
4248 name.remove! %r{\A(?:module|data|newtype|class|type family m|type)\s+}
4349 name.sub! %r{\A\((.+?)\)}, '\1'
44− name.sub!(/ (?:\:\: (\w+))?.+\z/) { |_| $1 ? " (#{$1})" : '' }
50+ name.sub!(/ (?:\:\: (\w+))?.*\z/) { |_| $1 ? " (#{$1})" : '' }
4551 next if name == self.name
4652 entries << [name, link['href'].remove('#')]
4753 end
lib/docs/scrapers/haskell.rb+19−15
@@ -2,27 +2,31 @@ module Docs · 1 unmodified line
22 class Haskell < UrlScraper
33 self.name = 'Haskell'
44 self.type = 'haskell'
5− self.version = '7.8.4'
6− self.base_url = 'https://downloads.haskell.org/~ghc/7.8.4/docs/html/libraries/'
5+ self.version = '7.10.2'
6+ self.base_url = "https://downloads.haskell.org/~ghc/#{version}/docs/html/libraries/"
77 self.root_path = 'index.html'
88
99 html_filters.push 'haskell/entries', 'haskell/clean_html'
1010
1111 options[:container] = '#content'
1212
13− options[:skip] = %w(
14− hoopl-3.10.0.1/Compiler-Hoopl-Internals.html
15− base-4.7.0.0/Control-Exception-Base.html
16− binary-0.7.1.0/Data-Binary-Get-Internal.html
17− template-haskell-2.9.0.0/Language-Haskell-TH-Lib.html
18− haskell98-2.0.0.3/Prelude.html
19− pretty-1.1.1.1/Text-PrettyPrint.html
20− base-4.7.0.0/Data-OldTypeable-Internal.html
21− base-4.7.0.0/Data-Typeable-Internal.html
22− base-4.7.0.0/GHC-IO-Encoding-Types.html
23− unix-2.7.0.1/System-Posix-Process-Internals.html)
24−
25− options[:skip_patterns] = [/src\//, /doc-index/, /haskell2010/, /ghc-/, /Cabal-/]
13+ options[:skip_patterns] = [
14+ /src\//,
15+ /doc-index/,
16+ /haskell2010/,
17+ /ghc-/,
18+ /Cabal-/,
19+ /Compiler-Hoopl-Internals\.html\z/i,
20+ /Control-Exception-Base\.html\z/i,
21+ /Data-Binary-Get-Internal\.html\z/i,
22+ /Language-Haskell-TH-Lib\.html\z/i,
23+ /Prelude\.html\z/i,
24+ /Text-PrettyPrint\.html\z/i,
25+ /Data-OldTypeable-Internal\.html\z/i,
26+ /Data-Typeable-Internal\.html\z/i,
27+ /GHC-IO-Encoding-Types\.html\z/i,
28+ /System-Posix-Process-Internals\.html\z/i
29+ ]
2630
2731 options[:attribution] = <<-HTML
2832 &copy; The University of Glasgow and others<br>