[commit: ghc] ghc-7.8: Fix #8706, documenting that type operators are not promoted. (bc62cdd)

git at git.haskell.org git at git.haskell.org
Mon Feb 17 09:14:58 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.8
Link       : http://ghc.haskell.org/trac/ghc/changeset/bc62cdd88a4b61088632ab53314b4685d0a48304/ghc

>---------------------------------------------------------------

commit bc62cdd88a4b61088632ab53314b4685d0a48304
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Fri Feb 7 17:24:07 2014 -0500

    Fix #8706, documenting that type operators are not promoted.
    
    (cherry picked from commit 218dead0d85a136b5d5648e4d6c4c9cc9467eb45)


>---------------------------------------------------------------

bc62cdd88a4b61088632ab53314b4685d0a48304
 docs/users_guide/glasgow_exts.xml |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index fb3eb48..9910d2b 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -6652,6 +6652,18 @@ See also <ulink url="http://ghc.haskell.org/trac/ghc/ticket/7347">Trac #7347</ul
 </para>
 </sect2>
 
+<sect2>
+<title>Promoting type operators</title>
+<para>
+Type operators are <emphasis>not</emphasis> promoted to the kind level. Why not? Because
+<literal>*</literal> is a kind, parsed the way identifiers are. Thus, if a programmer
+tried to write <literal>Either * Bool</literal>, would it be <literal>Either</literal>
+applied to <literal>*</literal> and <literal>Bool</literal>? Or would it be
+<literal>*</literal> applied to <literal>Either</literal> and <literal>Bool</literal>.
+To avoid this quagmire, we simply forbid promoting type operators to the kind level.
+</para>
+</sect2>
+
 
 </sect1>
 



More information about the ghc-commits mailing list