Changes between Initial Version and Version 1 of Ticket #839


Ignore:
Timestamp:
Oct 3, 2006 7:28:18 AM (9 years ago)
Author:
simonpj
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #839

    • Property Summary changed from Generate documentation for built-in functiuons to Generate documentation for built-in types and functions
  • Ticket #839 – Description

    initial v1  
    1 GHC has a handful of built-in functions, that are
     1GHC has a bunch of primitive types, which are not definable in Haskell, such as
     2  * Int#, Float#, Double# etc
     3  * ByteArray#
     4  * etc
     5They are defined in `TysPrim` but nowhere documented. 
     6
     7GHC also has a handful of built-in functions, that are
    28  * Not primops
    39  * Are not definable in Haskell
     
    915  * inline
    1016  * lazy
    11 Currently they are documented in the [http://www.haskell.org/ghc/dist/current/docs/users_guide/special-ids.html (HEAD) user manual], but they are invisible to Haddock, and hence do not appear in the online Haddock documentation.  This is bad.
     17Currently they are documented in the [http://www.haskell.org/ghc/dist/current/docs/users_guide/special-ids.html (HEAD) user manual].
     18
     19However, '''both the primitive types, and these built-in functions, are invisible to Haddock''', and hence do not appear in the online Haddock documentation.  This is bad.
    1220
    1321You might think that the same would be true of the primitive operations (primops).  However, the primops are described by a text file {{{prelude/primops.txt.pp}}, and there's a preprocessor ({{{utils/genprimopcode}}}) that generates the base-package pseudo-module {{{GHC/Prim.hs}}} from the text file.  This pseudo-module is not compiled; but it ''is'' given to Haddock, and that's how the primops appear in the Haddock docs.
    1422
    15 So the task is to add a bit of extra markup syntax to {{{primops.txt.pp}}} so that it can describe these special built-in functions, and inject their type signatures and documentation into {{{GHC/Prim.hs}}}, so that Haddock can see it.  Not a huge task.
     23So the task is to add a bit of extra markup syntax to {{{primops.txt.pp}}} so that it can describe these special built-in types and functions, and inject their type signatures and documentation into {{{GHC/Prim.hs}}}, so that Haddock can see it.  Not a huge task.
    1624
    1725Thanks to Neil Mitchell for pointing out the difficulty.