summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2018-03-19 13:29:14 -0400
committerBen Gamari <ben@smart-cactus.org>2018-03-19 13:29:23 -0400
commitafad5561d88f04744c398ef0640d846db6262aa0 (patch)
tree1eccb6f5d1daada6f4ef27d8e21596682332362e /docs
parent2d4bda2e4ac68816baba0afab00da6f769ea75a7 (diff)
downloadhaskell-afad5561d88f04744c398ef0640d846db6262aa0.tar.gz
Add -flate-specialise which runs a later specialisation pass
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. It is not enabled by default or any optimisation level. Only by manually enabling the flag `-flate-specialise`. Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4457
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/using-optimisation.rst14
1 files changed, 14 insertions, 0 deletions
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.