[commit: ghc] master: Document Coercible in the user guide (1e36a38)

git at git.haskell.org git at git.haskell.org
Fri Mar 14 11:53:17 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/1e36a386042248523de69ad6b02c43a6631ed5d0/ghc

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

commit 1e36a386042248523de69ad6b02c43a6631ed5d0
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


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

1e36a386042248523de69ad6b02c43a6631ed5d0
 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 4217b7d..9dbd545 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -6729,6 +6729,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