[commit: ghc] master: Fix sample code of -fprint-explicit-kinds, plus sample when disabling PolyKinds (44a1d1f)
git at git.haskell.org
git at git.haskell.org
Mon Oct 29 19:12:14 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/44a1d1f6612e1e9ef07626e1d2536bb6ba55dbd2/ghc
>---------------------------------------------------------------
commit 44a1d1f6612e1e9ef07626e1d2536bb6ba55dbd2
Author: Yuji Yamamoto <whosekiteneverfly at gmail.com>
Date: Thu Oct 25 10:59:29 2018 +0900
Fix sample code of -fprint-explicit-kinds, plus sample when disabling PolyKinds
- Although the sample is for `-fprint-explicit-kinds`, the sample code
uses `-fprint-explicit-foralls` (but perhaps the output used to be
correct one of `-fprint-explicit-kinds`).
- Update the output with the recent version of GHC (ver. 8.4.3. I guess
it doesn't change in GHC 8.6...)
- Add more samples to clarify the difference of kinds, which tells
effect of `-fprint-explicit-kinds` more clearly.
>---------------------------------------------------------------
44a1d1f6612e1e9ef07626e1d2536bb6ba55dbd2
docs/users_guide/using.rst | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/docs/users_guide/using.rst b/docs/users_guide/using.rst
index e0807a9..e22622e 100644
--- a/docs/users_guide/using.rst
+++ b/docs/users_guide/using.rst
@@ -784,13 +784,16 @@ messages and in GHCi:
.. code-block:: none
- ghci> :set -XPolyKinds
- ghci> data T a = MkT
- ghci> :t MkT
- MkT :: forall (k :: Type) (a :: k). T a
- ghci> :set -fprint-explicit-kinds
- ghci> :t MkT
- MkT :: forall (k :: Type) (a :: k). T k a
+ ghci> :set -XPolyKinds
+ ghci> data T a = MkT
+ ghci> :t MkT
+ MkT :: forall (k :: Type) (a :: k). T a
+ ghci> :set -fprint-explicit-kinds
+ ghci> :t MkT
+ MkT :: forall (k :: Type) (a :: k). T k a
+ ghci> :set -XNoPolyKinds
+ ghci> :t MkT
+ MkT :: T * a
.. ghc-flag:: -fprint-explicit-runtime-reps
:shortdesc: Print ``RuntimeRep`` variables in types which are
More information about the ghc-commits
mailing list