From 849bd207fc0a6502f6c529fbbed9d2699747bd41 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 8 Jul 2018 07:50:26 +0200 Subject: [PATCH] add manpages from Debian --- ghc-pkg.man | 228 +++++++++++++++++++++++++++++++++++++++++++++++++++ ghc.spec | 11 +++ haddock.man | 231 ++++++++++++++++++++++++++++++++++++++++++++++++++++ runghc.man | 45 ++++++++++ 4 files changed, 515 insertions(+) create mode 100644 ghc-pkg.man create mode 100644 haddock.man create mode 100644 runghc.man diff --git a/ghc-pkg.man b/ghc-pkg.man new file mode 100644 index 0000000..ccac8e4 --- /dev/null +++ b/ghc-pkg.man @@ -0,0 +1,228 @@ +.TH ghc-pkg 1 "2010-01-27" +.SH NAME +ghc-pkg \- GHC Haskell Cabal package manager +.SH SYNOPSIS +.B ghc-pkg +.I action +.RI [ OPTION ]... +.SH DESCRIPTION +A package is a library of Haskell modules known to the compiler. The +.B ghc-pkg +tool allows adding or removing them from a package database. By +default, the system-wide package database is modified, but +alternatively the user's local package database or another specified +file can be used. +.PP +To make a package available for +.BR ghc , +.B ghc-pkg +can be used to register it. Unregistering it removes it from the +database. Also, packages can be hidden, to make +.B ghc +ignore the package by default, without uninstalling it. Exposing a +package makes a hidden package available. Additionally, +.B ghc-pkg +has various commands to query the package database. +.PP +Where a package name is required, the package can be named in full +including the version number (e.g. +.BR network-1.0 ), +or without the version number. Naming a package without the version +number matches all versions of the package; the specified action will +be applied to all the matching packages. A package specifier that +matches all version of the package can also be written +.BR pkg-* , +to make it clearer that multiple packages are being matched. +.SH ACTIONS +.TP +\fBregister\fP \fIfilename\fP|\fB-\fP +Register the package using the specified installed package +description. +.TP +\fBupdate\fP \fIfilename\fP|\fB-\fP +Register the package, overwriting any other package with the same +name. +.TP +\fBunregister\fP \fIpkg-id\fP +Unregister the specified package. +.TP +\fBexpose\fP \fIpkg-id\fP +Expose the specified package. +.TP +\fBhide\fP \fIpkg-id\fP +Hide the specified package +.TP +\fBlist\fP \fR[\fIpkg\fR]...\fP +List registered packages in the global database, and also the user +database if +.B --user +is given. If a package name is given all the registered versions will +be listed in ascending order. Accepts the +.B --simple-output +flag. +.TP +.B dot +Generate a graph of the package dependencies in a form suitable for +input for the graphviz tools. For example, to generate a PDF of the +dependency graph: +.br +\fB dot \| tred \| dot -Tpdf >pkgs.pdf\fP +.TP +\fBfind-module\fP \fImodule\fP +List registered packages exposing module +.I module +in the global database, and also the user database if +.B --user +is given. All the registered versions will be listed in ascending +order. Accepts the +.B --simple-output +flag. +.TP +\fBlatest\fP \fIpkg-id\fP +Prints the highest registered version of a package. +.TP +.B check +Check the consistency of package dependencies and list broken +packages. Accepts the +.B --simple-output +flag. +.TP +\fBdescribe\fP \fIpkg\fP +Give the registered description for the +specified package. The description is returned in precisely the syntax +required by ghc-pkg register. +.TP +\fBfield\fP \fIpkg field\fP +Extract the specified field of the package description for the +specified package. Accepts comma-separated multiple fields. +.TP +.B dump +Dump the registered description for every package. This is like +.BR ghc-pkg\ describe\ '*' , +expect that it is intended to be used by tools that parse the results, +rather than humans. +.TP +.B recache +Regenerate the package database cache. This command should only be +necessary if you added a package to the database by dropping a file +into the database directory manyally. By default, the global DB is +recached; to recache a different DB use +.B --user +or +.B --package-conf +as appropriate. +.SH OPTIONS +When asked to modify a database +.RB ( register ,\ unregister ,\ update ,\ hide ,\ expose ,\ and\ also\ check ), +.B ghc-pkg +modifies the global database by +default. Specifying +.B --user +causes it to act on the user database, +or +.B --package-conf +can be used to act on another database +entirely. When multiple of these options are given, the rightmost +one is used as the database to act upon. +.PP +Commands that query the package database +.RB ( list ,\ latest ,\ describe ,\ field ) +operate on the list of databases specified by the flags +.BR --user ,\ --global , +and +.BR --package-conf . +If none of these flags are +given, the default is +.BR --global\ --user . +.TP +.B --user +Use the current user's package database. +.TP +.B --global +Use the global package database. +.TP +\fB-f\fP \fIFILE\fP, \fB--package-conf=\fIFILE\fP +Use the specified package config file. +.TP +.BI --global-conf= FILE +Location of the global package config. +.TP +.B --force +Ignore missing dependencies, directories, and libraries. +.TP +.B --force-files +Ignore missing directories and libraries only. +.TP +.BR -g ,\ --auto-ghc-libs +Automatically build libs for GHCi (with register). +.TP +.BR -? ,\ --help +Display a help message and exit. +.TP +.BR -V ,\ --version +Output version information and exit. +.TP +.B --simple-output +Print output in easy-to-parse format for some commands. +.TP +.B --names-only +Only print package names, not versions; can only be used with +.BR list\ --simple-output . +.TP +.B --ignore-case +Ignore case for substring matching. +.SH ENVIRONMENT VARIABLES +.TP +.B GHC_PACKAGE_PATH +The +.B GHC_PACKAGE_PATH +environment variable may be set to a +.BR : -separated +list of files containing package databases. This list of package +databases is used by +.B ghc +and +.BR ghc-pkg , +with earlier databases in the list overriding later ones. This order +was chosen to match the behaviour of the +.B PATH +environment variable; think of it as a list of package databases that +are searched left-to-right for packages. + +If +.B GHC_PACKAGE_PATH +ends in a separator, then the default user and system package +databases are appended, in that order. e.g. to augment the usual set +of packages with a database of your own, you could say: + +.br +\fB export GHC_PACKAGE_PATH=$HOME/.my-ghc-packages.conf:\fP +.br + +To check whether your +.B GHC_PACKAGE_PATH +setting is doing the right thing, +.B ghc-pkg list +will list all the databases in use, in the reverse order they are +searched. +.SH FILES +Both of these locations are changed for Debian. Upstream still keeps +these under +.IR /usr . +Some programs may refer to that, but look in +.I /var +instead. +.TP +.I /var/lib/ghc/package.conf +Global package.conf file. +.TP +.I /var/lib/ghc/package.conf.d/ +Directory for library specific package.conf files. These are added to +the global registry. +.SH "SEE ALSO" +.BR ghc (1), +.BR runghc (1), +.BR hugs (1). +.SH AUTHOR +This manual page was written by Kari Pahula , for the +Debian project (and may be used by others). diff --git a/ghc.spec b/ghc.spec index e3658d8..24cc6d6 100644 --- a/ghc.spec +++ b/ghc.spec @@ -38,6 +38,9 @@ Source1: https://downloads.haskell.org/~ghc/%{ghc_release}/ghc-%{version}-testsu %endif Source3: ghc-doc-index.cron Source4: ghc-doc-index +Source5: ghc-pkg.man +Source6: haddock.man +Source7: runghc.man # absolute haddock path (was for html/libraries -> libraries) Patch1: ghc-gen_contents_index-haddock-path.patch Patch2: ghc-Cabal-install-PATH-warning.patch @@ -451,6 +454,10 @@ cd .. # we package the library license files separately find %{buildroot}%{ghc_html_libraries_dir} -name LICENSE -exec rm '{}' ';' +mkdir -p %{buildroot}%{_mandir}/man1 +install -p -m 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/ghc-pkg.1 +install -p -m 0644 %{SOURCE6} %{buildroot}%{_mandir}/man1/haddock.1 +install -p -m 0644 %{SOURCE7} %{buildroot}%{_mandir}/man1/runghc.1 %check export LANG=en_US.utf8 @@ -576,6 +583,10 @@ fi %{ghclibdir}/template-hsc.h %dir %{_docdir}/ghc %dir %{ghc_html_dir} +%{_mandir}/man1/ghc-pkg.1* +%{_mandir}/man1/haddock.1* +%{_mandir}/man1/runghc.1* + %if %{with docs} %{_bindir}/ghc-doc-index %{_bindir}/haddock diff --git a/haddock.man b/haddock.man new file mode 100644 index 0000000..a30106b --- /dev/null +++ b/haddock.man @@ -0,0 +1,231 @@ +.TH HADDOCK 1 "July 2010" "Haddock, version 2.6.1" "Haddock documentation generator" + + +.SH NAME +haddock \- documentation tool for annotated Haskell source code + + +.SH SYNOPSIS +.B haddock +.RI [ options ] " file" ... + + +.SH DESCRIPTION +This manual page documents briefly the +.B haddock +command. +Extensive documentation is available in various other formats including DVI, +PostScript and HTML; see below. + +.PP +.I file +is a filename containing a Haskell source module. +All the modules specified on the command line will be processed together. +When one module refers to an entity in another module being processed, the +documentation will link directly to that entity. + +Entities that cannot be found, for example because they are in a module that +is not being processed as part of the current batch, simply will not be +hyperlinked in the generated documentation. +.B haddock +will emit warnings listing all the identifiers it could not resolve. + +The modules should not be mutually recursive, as +.B haddock +does not like swimming in circles. + + +.SH OPTIONS +The programs follow the usual GNU command line syntax, with long +options starting with two dashes (`--'). +A summary of options is included below. +For a complete description, see the other documentation. + +.TP +\fB\-o \fIDIR\fP, \-\-odir=\fIDIR\fP +directory in which to put the output files + +.TP +\fB\-i \fIFILE\fP, \-\-read-interface=\fIFILE\fP +read an interface from +.IR FILE . + +.TP +\fB\-D \fIFILE\fP, \-\-dump\-interface=\fIFILE\fP +dump an interface for these modules in +.IR FILE . + +.TP +\fB\-l \fIDIR\fP, \-\-lib=\fIDIR\fP +location of Haddock's auxiliary files + +.TP +.BR \-h ", " \-\-html +Generate documentation in HTML format. +Several files will be generated into the current directory (or the specified +directory if the +.B \-o +option is given), including the following: +.RS +.TP +.I index.html +The top level page of the documentation: +lists the modules available, using indentation to represent the hierarchy if +the modules are hierarchical. +.TP +.I haddock.css +The stylesheet used by the generated HTML. +Feel free to modify this to change the colors or layout, or even specify +your own stylesheet using the +.B \-\-css +option. +.TP +.I module.html +An HTML page for each module. +.TP +.IR doc-index.html ", " doc-index-XX.html +The index, split into two (functions/constructors and types/classes, as per +Haskell namespaces) and further split alphabetically. +.RE + +.TP +.B \-\-hoogle +output for Hoogle + +.TP +\fB\-\-html\-help=\fIformat +produce index and table of contents in mshelp, mshelp2 or devhelp format +(with \fI\-h\fP) + +.TP +\fB\-\-source\-base=\fPURL +Include links to the source files in the generated documentation, where URL +is the base URL where the source files can be found. + +.TP +\fB\-s \fPURL, \fB\-\-source\-module=\fPURL +Include links to the source files in the generated documentation, where URL +is a source code link for each module (using the %{FILE} or %{MODULE} vars). + +.TP +\fB\-\-source\-entity=\fPURL +Include links to the source files in the generated documentation, where URL +is a source code link for each entity (using the %{FILE}, %{MODULE} or %{NAME} vars). + +.TP +\fB\-\-comments\-base=\fPURL +URL for a comments link on the contents and index pages. +.TP +\fB\-\-comments\-module=\fPURL +URL for a comments link for each module (using the %{MODULE} var). +.TP +\fB\-\-comments\-entity=\fPURL +URL for a comments link for each entity (using the %{FILE}, %{MODULE} or %{NAME} vars). +.TP +.BI \-\-css= FILE +Use the CSS +.I FILE +instead of the default stylesheet that comes with +.B haddock +for HTML output. It should specify certain classes: see the default stylesheet for details. + +.TP +\fB\-p \fIFILE\fP, \-\-prologue=\fIFILE\fP +Specify a file containing prologue text. + +.TP +\fB\-t \fITITLE\fP, \-\-title=\fITITLE\fP +Use \fITITLE\fP as the page heading for each page in the documentation. +This will normally be the name of the library being documented. + +The title should be a plain string (no markup please!). + +.TP +\fB\-k \fINAME\fP, \-\-package=\fINAME\fP +Specify the package name (optional). + +.TP +.BR \-n ", " \-\-no\-implicit\-prelude +do not assume Prelude is imported + +.TP +.BR \-d ", " \-\-debug +Enable extra debugging output. + +.TP +.BR \-? ", " \-\-help +Display help. + +.TP +.BR \-V ", " \-\-version +Display version. + +.TP +.BR \-v ", " \-\-verbose +Verbose status reporting. + +.TP +\fB\-\-use\-contents=\fPURL +Use a separately-generated HTML contents page. + +.TP +.B \-\-gen\-contents +Generate an HTML contents from specified interfaces. + +.TP +\fB\-\-use\-index=\fPURL +Use a separately-generated HTML index. + +.TP +.B \-\-gen\-index +Generate an HTML index from specified interfaces. + +.TP +.B \-\-ignore\-all\-exports +Behave as if all modules have the ignore-exports atribute + +.TP +\fB\-\-hide=\fIMODULE +Behave as if \fIMODULE\fP has the hide attribute. + +.TP +\fB\-\-use\-package=\fIPACKAGE +The modules being processed depend on \fIPACKAGE\fP. + +.SH FILES +.I /usr/bin/haddock +.br +.I /usr/share/haddock-2.6.1/html/plus.gif +.br +.I /usr/share/haddock-2.6.1/html/minus.gif +.br +.I /usr/share/haddock-2.6.1/html/haskell_icon.gif +.br +.I /usr/share/haddock-2.6.1/html/haddock.js +.br +.I /usr/share/haddock-2.6.1/html/haddock.css +.br +.I /usr/share/haddock-2.6.1/html/haddock-DEBUG.css + +.SH SEE ALSO +.IR /usr/share/doc/haddock/ , +.br +the Haddock homepage +.UR http://haskell.org/haddock/ +(http://haskell.org/haddock/) +.UE + +.SH COPYRIGHT +Haddock version 2.6.1 + +Copyright 2006-2010 Simon Marlow , Dawid Waern . +All rights reserved. + + +.SH AUTHOR +This manual page was written by Michael Weber +for the Debian GNU/Linux system (but may be used by others). + +.\" Local variables: +.\" mode: nroff +.\" End: diff --git a/runghc.man b/runghc.man new file mode 100644 index 0000000..61a9076 --- /dev/null +++ b/runghc.man @@ -0,0 +1,45 @@ +.TH RUNGHC 1 "28 NOVEMBER 2007" +.SH NAME +runghc \- program to run Haskell programs without first having to compile them. +.SH SYNOPSIS +.B runghc +.RI +[runghc|flags] [GHC|flags] module [program|flags]... +.br +.SH DESCRIPTION +.B runghc +is considered a non-interactive interpreter and part of The Glasgow Haskell Compiler. +.B runghc +is a compiler that automatically runs its results at the end. +.PP +.SH OPTIONS +.TP +the flags are: +.TP +.B \-f +it tells runghc which GHC to use to run the program. If it is not given then runghc will search for GHC in the directories in the system search path. runghc -f /path/to/ghc +.TP +.B \-- +runghc will try to work out where the boundaries between [runghc flags] and [GHC flags], and [GHC flags] and module are, but you can use a -- flag if it doesn't get it right. For example, runghc -- -fglasgow-exts Foo +means runghc won't try to use glasgow-exts as the path to GHC, but instead will pass the flag to GHC. + +.SH EXAMPLES +.TP +.B runghc foo +.PP +.B runghc -f /path/to/ghc foo +.TP +.B runghc -- -fglasgow-exts Foo + +.SH SEE ALSO +.BR ghc (1), +.BR ghci (1). +.br + +.SH COPYRIGHT +Copyright 2002, The University Court of the University of Glasgow. All rights reserved. + +.SH AUTHOR +This manual page was written by Efrain Valles Pulgar . This is free documentation; see the GNU +General Public Licence version 2 or later for copying conditions. There is NO WARRANTY. +