diff options
Diffstat (limited to 'docs/users_guide/using-optimisation.rst')
-rw-r--r-- | docs/users_guide/using-optimisation.rst | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst index 9436832611..e56c47312c 100644 --- a/docs/users_guide/using-optimisation.rst +++ b/docs/users_guide/using-optimisation.rst @@ -522,7 +522,7 @@ list. Turn on call-pattern specialisation; see `Call-pattern specialisation for Haskell programs - <http://research.microsoft.com/en-us/um/people/simonpj/papers/spec-constr/index.htm>`__. + <https://www.microsoft.com/en-us/research/publication/system-f-with-type-equality-coercions-2/>`__. This optimisation specializes recursive functions according to their argument "shapes". This is best explained by example so consider: :: @@ -580,6 +580,16 @@ list. body directly, allowing heavy specialisation over the recursive cases. +.. ghc-flag:: -fspec-constr-keen + + :default: off + + If this flag is on, call-patten specialision will specialise a call + ``(f (Just x))`` with an explicit constructor agument, even if the argument + is not scrutinised in the body of the function. This is sometimes + beneficial; e.g. the argument might be given to some other function + that can itself be specialised. + .. ghc-flag:: -fspec-constr-count=<n> :default: 3 |