Simon Peyton Jones pushed to branch wip/spj-try-opt-coercion at Glasgow Haskell Compiler / GHC Commits: d2e98e01 by Simon Peyton Jones at 2026-01-19T15:25:26+00:00 Update user manual - - - - - 2 changed files: - docs/users_guide/debugging.rst - docs/users_guide/using-optimisation.rst Changes: ===================================== docs/users_guide/debugging.rst ===================================== @@ -265,6 +265,17 @@ the desugarer and includes the simplifier, worker-wrapper transformation, the rule engine, the specialiser, the strictness/occurrence analyser, and a common subexpression elimination pass. +.. ghc-flag:: -dcheck-opt-co + :shortdesc: Add consistency checks to the coercion optimisiers + shorter + :type: dynamic + + Affects both :ghc-flag:`-fopt-coercion` and :ghc-flag:`-fopt-refl-coercion`. + Adds compile-time checks that these coercion optimisers don't change types; + and adds a trace message if they succeeds in shrinking (or expanding) the + coercion. If you add :ghc-flag:`-dppr-debug` you can see the shrunk/expanded + coercion itself. + .. ghc-flag:: -ddump-call-arity :shortdesc: Dump output of the call arity analysis pass. :type: dynamic ===================================== docs/users_guide/using-optimisation.rst ===================================== @@ -1004,7 +1004,18 @@ as such you shouldn't need to set any of them explicitly. A flag :default: on - Turn on the coercion optimiser. + Turn on the "big hammer" coercion optimiser. + +.. ghc-flag:: -fopt-refl-coercion + :shortdesc: Turn on the lightweight coercion optimiser + :type: dynamic + :reverse: -fno-opt-refl-coercion + :category: + + :default: on + + Turn on the "lightweight" coercion optimiser, which just looks for + reflexivity within sequences of coercions. .. ghc-flag:: -fno-pre-inlining :shortdesc: Turn off pre-inlining View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d2e98e0151800419bf1b9b7702848359... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d2e98e0151800419bf1b9b7702848359... You're receiving this email because of your account on gitlab.haskell.org.