From 44a1d1f6612e1e9ef07626e1d2536bb6ba55dbd2 Mon Sep 17 00:00:00 2001 From: Yuji Yamamoto Date: Thu, 25 Oct 2018 10:59:29 +0900 Subject: 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. --- 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 e0807a9620..e22622e394 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 -- cgit v1.2.1