Template:Haskell lib

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

{{{1}}}

[edit] What does this template do?

This template generates links to the documentation of library modules. For example, if you talk about Control.Monad and want the text to be a proper link to the latest haddocks, this template is for you.

The links point to the library documentation on Hackage. You have to specify the exact version of a package. The default is package=base|version=3.0.0.0. Short forms are allowed, i.e. p=base|v=3.0.0.0. Exception: in the special case of the Prelude, it will link to the language standard.

Arguably, automatic syntax coloring and hyperlinking of Haskell source code should obsolete this template.

[edit] Usage

source result
{{Haskell lib|Control|Monad}} Control.Monad from the base-package.
{{Haskell lib|p=mtl|v=1.1.0.0|Control|Monad|State}} Control.Monad.State from the version 1.0.0.0 of the mtl-package.
{{Haskell lib|Prelude}} Prelude from the language standard.

Currently, the module name may be only 5 levels deep, but that's easy to change.

Personal tools
Create a book
  • Collections help