moocfi / haskell-mooc

Haskell MOOC University of Helsinki
Other
313 stars 446 forks source link

Use links to latest hackage doc pages #19

Closed muzimuzhi closed 3 years ago

muzimuzhi commented 3 years ago

Unless the material need to stick to specific version of GHC/haskell package, I think it's preferable to use general links which will redirect to latest version of hackage doc pages.

For example, current link

<a href="http://hackage.haskell.org/package/base-4.12.0.0/docs/src/GHC.Base.html#map">Here’s map</a>

suggested link (https used)

<a href="https://hackage.haskell.org/package/base/docs/src/GHC.Base.html#map">Here’s map</a>

which will redirect to doc page for the latest base-4.14.1.0.

6 such links are found in part1.html:

$ grep -rno 'https\?://hackage\.haskell\.org/package/[a-xA-Z]\+-.*\.html' part1.html

part1.html:2024:http://hackage.haskell.org/package/base-4.12.0.0/docs/src/GHC.Base.html
part1.html:2028:http://hackage.haskell.org/package/base-4.12.0.0/docs/src/GHC.List.html
part1.html:2605:https://hackage.haskell.org/package/containers-0.6.0.1/docs/Data-Map-Lazy.html
part1.html:3273:https://hackage.haskell.org/package/base-4.12.0.0/docs/Prelude.html
part1.html:3293:https://hackage.haskell.org/package/base-4.12.0.0/docs/Prelude.html
part1.html:3548:https://hackage.haskell.org/package/base-4.12.0.0/docs/Data-List-NonEmpty.html
opqdonut commented 3 years ago

Hi and thanks for the report! I'm intentionally trying to link to the versions of packages that the tests use. This (currently) means the Stack lts-14.9 snapshot.

muzimuzhi commented 3 years ago

got it. Many Thanks for the nice course, and look forward to the part 2.