diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-12-21 09:14:19 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-12-21 09:14:19 +0000 |
commit | 6290c7bd0941dc2ae02df200d903d35ca825c4aa (patch) | |
tree | 55363ccef69874ab64ae2ed83ca0eee5f58770c4 /docs | |
parent | 66fa1886769c9e4b7aec4d278a797538a6220ced (diff) | |
download | haskell-6290c7bd0941dc2ae02df200d903d35ca825c4aa.tar.gz |
Clarify promotion rules for newtypes in the documentation
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/glasgow_exts.xml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index c7b695c15f..78986778eb 100644 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -5528,7 +5528,10 @@ kinds have sort <literal>BOX</literal>. <para> The following restrictions apply to promotion: <itemizedlist> - <listitem><para>We only promote datatypes whose kinds are of the form + <listitem><para>We promote <literal>data</literal> types and <literal>newtypes</literal>, + but not type synonyms, or type/data families (<xref linkend="type-families"/>). + </para></listitem> + <listitem><para>We only promote types whose kinds are of the form <literal>* -> ... -> * -> *</literal>. In particular, we do not promote higher-kinded datatypes such as <literal>data Fix f = In (f (Fix f))</literal>, or datatypes whose kinds involve promoted types such as @@ -5537,8 +5540,6 @@ The following restrictions apply to promotion: polymorphic, involve constraints, mention type or data families, or involve types that are not promotable. </para></listitem> - <listitem><para>We do not promote data family instances (<xref linkend="data-families"/>). - </para></listitem> </itemizedlist> </para> </sect2> |