[commit: ghc] ghc-7.8: Document Coercible in the user guide (e202106)
git at git.haskell.org
git at git.haskell.org
Mon Mar 17 15:36:39 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-7.8
Link : http://ghc.haskell.org/trac/ghc/changeset/e20210668262a0abe3843aa654957420ba5437ef/ghc
>---------------------------------------------------------------
commit e20210668262a0abe3843aa654957420ba5437ef
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Fri Mar 14 12:51:37 2014 +0100
Document Coercible in the user guide
as a subsection of "Equality constraints", containing references to the
module's haddock and to the paper. Fixes #8888
(cherry picked from commit 1e36a386042248523de69ad6b02c43a6631ed5d0)
>---------------------------------------------------------------
e20210668262a0abe3843aa654957420ba5437ef
docs/users_guide/glasgow_exts.xml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index 9910d2b..4707807 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -6708,6 +6708,21 @@ class (F a ~ b) => C a b where
with the class head. Method signatures are not affected by that
process.
</para>
+
+ <sect2 id="coercible">
+ <title>The <literal>Coercible</literal> constraint</title>
+ <para>
+ The constraint <literal>Coercible t1 t2</literal> is similar to <literal>t1 ~
+ t2</literal>, but denotes representational equality between
+ <literal>t1</literal> and <literal>t2</literal> in the sense of Roles
+ (<xref linkend="roles"/>). It is exported by
+ <ulink url="&libraryBaseLocation;/Data-Coerce.html"><literal>Data.Coerce</literal></ulink>,
+ which also contains the documentation. More details and discussion can be found in
+ the paper
+ <ulink href="http://www.cis.upenn.edu/~eir/papers/2014/coercible/coercible.pdf">Safe Coercions"</ulink>.
+ </para>
+ </sect2>
+
</sect1>
<sect1 id="constraint-kind">
More information about the ghc-commits
mailing list