[commit: packages/ghc-prim] master: Better Comment [Kind-changing of (~) and Coercible] (b19daeb)

git at git.haskell.org git at git.haskell.org
Fri Mar 14 11:30:36 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/b19daeb18c2c64ef2207f70806048c5288e1333c/ghc-prim

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

commit b19daeb18c2c64ef2207f70806048c5288e1333c
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Fri Mar 14 12:26:14 2014 +0100

    Better Comment [Kind-changing of (~) and Coercible]


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

b19daeb18c2c64ef2207f70806048c5288e1333c
 GHC/Types.hs |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/GHC/Types.hs b/GHC/Types.hs
index 25f4176..3023045 100644
--- a/GHC/Types.hs
+++ b/GHC/Types.hs
@@ -95,11 +95,21 @@ Furthermore the type of MkCoercible cannot be written in Haskell (no syntax for
 
 So we define them as regular data types in GHC.Types, but do /not/ export them.
 This ensures we have a home module. We then define them with the types and
-kinds that we actually want, in TysWiredIn, and export them in GHC.Prim.
+kinds that we actually want, in TysWiredIn.
+
+We also export coercibleTyCon in PrelInfo's ghcPrimExports.
+(This is not needed for (~), as that is not importable and handled specially by
+the parser).
+Why not export it in GHC.Types? Because then ghci and haddock would, for some
+reason, display it as a data type, and not as a constraint.
 
 Haddock still takes the documentation from GHC.Types (and not from the fake
 module created from primops.txt.pp), so we have the user-facing documentation
 here.
+
+(This this note merely documents what is implemented because it happens to
+work, and should not be taken as an indication of good design. Cleanup is
+appreciated).
 -}
 
 



More information about the ghc-commits mailing list