diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2018-03-21 17:02:21 -0400 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2018-03-21 17:02:21 -0400 |
commit | 4a47fd33d2f16070d4fe8bd32a104587608061cd (patch) | |
tree | 204afacf3bf4177de01b8f2778f4154c26bf578b /docs | |
parent | c663b715b6201d460e8bf2b6fb26e61c700384e0 (diff) | |
parent | 0aa7d8796a95298e906ea81fe4a52590d75c2e47 (diff) | |
download | haskell-wip/T14068.tar.gz |
Merge branch 'wip/T14951' into wip/T14068wip/T14068
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/debugging.rst | 14 | ||||
-rw-r--r-- | docs/users_guide/ghc_packages.py | 4 | ||||
-rw-r--r-- | docs/users_guide/glasgow_exts.rst | 2 | ||||
-rw-r--r-- | docs/users_guide/runtime_control.rst | 6 | ||||
-rw-r--r-- | docs/users_guide/using-optimisation.rst | 14 |
5 files changed, 36 insertions, 4 deletions
diff --git a/docs/users_guide/debugging.rst b/docs/users_guide/debugging.rst index d11cc04fd0..c6d90e642d 100644 --- a/docs/users_guide/debugging.rst +++ b/docs/users_guide/debugging.rst @@ -588,6 +588,20 @@ Formatting dumps let expressions. This is helpful when your code does a lot of unboxing. +.. ghc-flag:: -dhex-word-literals + :shortdesc: Print values of type `Word#` in hexadecimal. + :type: dynamic + + Print values of type `Word#` and `Word64#` (but not values of + type `Int#` and `Int64#`) in hexadecimal instead of decimal. + The hexadecimal is zero-padded to make the length of the + representation a power of two. For example: `0x0A0A##`, + `0x000FFFFF##`, `0xC##`. This flag may be helpful when you + are producing a bit pattern that to expect to work correctly on a 32-bit + or a 64-bit architecture. Dumping hexadecimal literals after + optimizations and constant folding makes it easier to confirm + that the generated bit pattern is correct. + .. ghc-flag:: -dno-debug-output :shortdesc: Suppress unsolicited debugging output :type: dynamic diff --git a/docs/users_guide/ghc_packages.py b/docs/users_guide/ghc_packages.py index d4a688b370..6419834e1e 100644 --- a/docs/users_guide/ghc_packages.py +++ b/docs/users_guide/ghc_packages.py @@ -8,13 +8,13 @@ from utils import build_table_from_list def read_cabal_file(pkg_path): import re cabal_file = open(pkg_path, 'r').read() - pkg_name = re.search(r'[nN]ame:\s*([-a-zA-Z0-9]+)', cabal_file) + pkg_name = re.search(r'^[nN]ame\s*:\s*([-a-zA-Z0-9]+)', cabal_file, re.MULTILINE) if pkg_name is not None: pkg_name = pkg_name.group(1) else: raise RuntimeError("Failed to parse `Name:` field from %s" % pkg_path) - pkg_version = re.search(r'[vV]ersion:\s*(\d+(\.\d+)*)', cabal_file) + pkg_version = re.search(r'^[vV]ersion\s*:\s*(\d+(\.\d+)*)', cabal_file, re.MULTILINE) if pkg_version is not None: pkg_version = pkg_version.group(1) else: diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst index c6cff92790..49c6ed4709 100644 --- a/docs/users_guide/glasgow_exts.rst +++ b/docs/users_guide/glasgow_exts.rst @@ -9442,7 +9442,7 @@ The following things have kind ``Constraint``: - Anything whose form is not yet known, but the user has declared to have kind ``Constraint`` (for which they need to import it from ``GHC.Exts``). So for example - ``type Foo (f :: \* -> Constraint) = forall b. f b => b -> b`` + ``type Foo (f :: * -> Constraint) = forall b. f b => b -> b`` is allowed, as well as examples involving type families: :: type family Typ a b :: Constraint diff --git a/docs/users_guide/runtime_control.rst b/docs/users_guide/runtime_control.rst index 009e3ae887..92bc739dfe 100644 --- a/docs/users_guide/runtime_control.rst +++ b/docs/users_guide/runtime_control.rst @@ -776,6 +776,7 @@ RTS options to produce runtime statistics -s [⟨file⟩] -S [⟨file⟩] --machine-readable + --internal-counters These options produce runtime-system statistics, such as the amount of time spent executing the program and in the garbage collector, @@ -785,7 +786,10 @@ RTS options to produce runtime statistics line of output in the same format as GHC's ``-Rghc-timing`` option, ``-s`` produces a more detailed summary at the end of the program, and ``-S`` additionally produces information about each and every - garbage collection. + garbage collection. Passing ``--internal-counters`` to a threaded + runtime will cause a detailed summary to include various internal + counts accumulated during the run; note that these are unspecified + and may change between releases. The output is placed in ⟨file⟩. If ⟨file⟩ is omitted, then the output is sent to ``stderr``. diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst index 3566462eeb..d6c24de502 100644 --- a/docs/users_guide/using-optimisation.rst +++ b/docs/users_guide/using-optimisation.rst @@ -884,6 +884,20 @@ by saying ``-fno-wombat``. which they are called in this module. Note that specialisation must be enabled (by ``-fspecialise``) for this to have any effect. +.. ghc-flag:: -flate-specialise + :shortdesc: Run a late specialisation pass + :type: dynamic + :reverse: -fno-late-specialise + :default: off + + Runs another specialisation pass towards the end of the optimisation + pipeline. This can catch specialisation opportunities which arose from + the previous specialisation pass or other inlining. + + You might want to use this if you are you have a type class method + which returns a constrained type. For example, a type class where one + of the methods implements a traversal. + .. ghc-flag:: -fsolve-constant-dicts :shortdesc: When solving constraints, try to eagerly solve super classes using available dictionaries. |