summaryrefslogtreecommitdiff
path: root/docs/users_guide
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2015-04-23 22:34:33 -0400
committerRichard Eisenberg <eir@cis.upenn.edu>2015-04-24 17:00:43 -0400
commit72a927267d9c658a2e5d226a855702d348472516 (patch)
tree377b1e2eeee21bda437b0f456f615fb5d487ece3 /docs/users_guide
parentdc587fe7f27e2bc762d8a6cae3687ca2ebbbdb9b (diff)
downloadhaskell-72a927267d9c658a2e5d226a855702d348472516.tar.gz
Change default roles in hs-boot files. (#9204)
Test case: roles/should_compile/T9204b
Diffstat (limited to 'docs/users_guide')
-rw-r--r--docs/users_guide/7.12.1-notes.xml13
-rw-r--r--docs/users_guide/separate_compilation.xml2
2 files changed, 13 insertions, 2 deletions
diff --git a/docs/users_guide/7.12.1-notes.xml b/docs/users_guide/7.12.1-notes.xml
index 5bdf96d9e1..4dbb0b20cd 100644
--- a/docs/users_guide/7.12.1-notes.xml
+++ b/docs/users_guide/7.12.1-notes.xml
@@ -59,7 +59,18 @@
See the release notes for base for a description of the
<literal>CallStack</literal> type.
</para>
- </listitem>
+ </listitem>
+ <listitem>
+ <para>
+ To conform to the common case, the default role assigned to parameters
+ of datatypes declared in <literal>hs-boot</literal> files is
+ <literal>representational</literal>. However, if the constructor(s)
+ for the datatype are given, it makes sense to do normal role inference.
+ This is now implemented, effectively making the default role for
+ non-abstract datatypes in <literal>hs-boot</literal> files to be
+ <literal>phantom</literal>, like it is in regular Haskell code.
+ </para>
+ </listitem>
</itemizedlist>
</sect3>
diff --git a/docs/users_guide/separate_compilation.xml b/docs/users_guide/separate_compilation.xml
index 07cf76c6c7..f6b2cba0ce 100644
--- a/docs/users_guide/separate_compilation.xml
+++ b/docs/users_guide/separate_compilation.xml
@@ -878,7 +878,7 @@ methods entirely; but you must either omit them all or put them all in.
</para></listitem>
<listitem><para> You can include instance declarations just as in Haskell; but omit the "where" part.
</para></listitem>
-<listitem><para>The default role for class and datatype parameters is now representational. To get another role, use a role annotation. (See <xref linkend="roles"/>.)</para></listitem>
+<listitem><para>The default role for abstract datatype parameters is now representational. (An abstract datatype is one with no constructors listed.) To get another role, use a role annotation. (See <xref linkend="roles"/>.)</para></listitem>
</itemizedlist>
</para>
</sect2>