[commit: ghc] master: Fix #8706, documenting that type operators are not promoted. (218dead)

git at git.haskell.org git at git.haskell.org
Sat Feb 8 19:11:06 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/218dead0d85a136b5d5648e4d6c4c9cc9467eb45/ghc

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

commit 218dead0d85a136b5d5648e4d6c4c9cc9467eb45
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.


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

218dead0d85a136b5d5648e4d6c4c9cc9467eb45
 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