[commit: ghc] master: Improve generated `GHC.Prim` docs (feb8a67)
git at git.haskell.org
git at git.haskell.org
Thu Oct 4 15:39:06 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/feb8a671a4e92922ddac108686f0eace97dd331f/ghc
>---------------------------------------------------------------
commit feb8a671a4e92922ddac108686f0eace97dd331f
Author: Alec Theriault <alec.theriault at gmail.com>
Date: Thu Oct 4 11:18:54 2018 -0400
Improve generated `GHC.Prim` docs
Summary:
* Extended `genprimcode` to generate Haddock-compatible deprecations,
as well as displaying information about which functions are LLVM-only
and which functions can fail with an unchecked exception.
* Ported existing deprecations to the new format, and also added a
deprecation on `par#` (see Trac #15227).
* Emit an error on fixity/deprecation of builtins, unless we are
processing the module in which that name is defined (see Trac #15233).
That means the following is no longer accepted (outside of `GHC.Types`):
```
infixr 7 :
{-# DEPRECATED (:) "cons is deprecated" #-}
```
* Generate `data (->) a b` with docs and fixity in `GHC.Prim`. This
means: GHC can now parse `data (->) a b` and `infixr 0 ->` (only in
`GHC.Prim`) and `genprimcode` can digest `primtype (->) a b` (See Trac
#4861)
as well as some misc fixes along the way.
Reviewers: bgamari, RyanGlScott
Reviewed By: RyanGlScott
Subscribers: RyanGlScott, rwbarton, mpickering, carter
GHC Trac Issues: #15227, #15233, #4861
Differential Revision: https://phabricator.haskell.org/D5167
>---------------------------------------------------------------
feb8a671a4e92922ddac108686f0eace97dd331f
compiler/iface/LoadIface.hs | 3 +-
compiler/parser/Parser.y | 1 +
compiler/prelude/TysWiredIn.hs | 3 +
compiler/prelude/primops.txt.pp | 89 +++++++++++-----
compiler/rename/RnEnv.hs | 14 ++-
compiler/types/TyCon.hs | 1 +
testsuite/tests/parser/should_fail/T15233.hs | 9 ++
testsuite/tests/parser/should_fail/T15233.stderr | 8 ++
testsuite/tests/parser/should_fail/all.T | 1 +
utils/genprimopcode/Lexer.x | 2 +-
utils/genprimopcode/Main.hs | 127 +++++++++++++++--------
utils/genprimopcode/Parser.y | 9 +-
12 files changed, 190 insertions(+), 77 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc feb8a671a4e92922ddac108686f0eace97dd331f
More information about the ghc-commits
mailing list