[commit: ghc] master, master: Coercible is now exported from GHC.Types (#8894) (d59170b)

git at git.haskell.org git at git.haskell.org
Sun Mar 16 17:54:35 UTC 2014


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

On branches: master,master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d59170b6deaee480640889e8a7eef5a863242562/ghc

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

commit d59170b6deaee480640889e8a7eef5a863242562
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Sun Mar 16 18:35:28 2014 +0100

    Coercible is now exported from GHC.Types (#8894)
    
    so do not export it in GHC.Prim, and also have the pseudo-code for
    GHC.Prim import GHC.Types, so that haddock is happy.


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

d59170b6deaee480640889e8a7eef5a863242562
 compiler/prelude/PrelInfo.lhs   |    4 +---
 compiler/prelude/primops.txt.pp |    2 --
 utils/genprimopcode/Main.hs     |    1 +
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/compiler/prelude/PrelInfo.lhs b/compiler/prelude/PrelInfo.lhs
index ca156ee..014e0e7 100644
--- a/compiler/prelude/PrelInfo.lhs
+++ b/compiler/prelude/PrelInfo.lhs
@@ -124,15 +124,13 @@ primOpId op = primOpIds ! primOpTag op
 GHC.Prim "exports" all the primops and primitive types, some
 wired-in Ids.
 
-See Note [Kind-changing of (~) and Coerciblea] for why we export coercibleTyCon here.
-
 \begin{code}
 ghcPrimExports :: [IfaceExport]
 ghcPrimExports
  = map (Avail . idName) ghcPrimIds ++
    map (Avail . idName . primOpId) allThePrimOps ++
    [ AvailTC n [n] 
-   | tc <- funTyCon : coercibleTyCon : primTyCons, let n = tyConName tc  ]
+   | tc <- funTyCon : primTyCons, let n = tyConName tc  ]
 \end{code}
 
 
diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp
index 63aef0f..49fef35 100644
--- a/compiler/prelude/primops.txt.pp
+++ b/compiler/prelude/primops.txt.pp
@@ -2380,8 +2380,6 @@ pseudoop   "coerce"
      concrete types.
    }
 
-primclass Coercible a b
-
 ------------------------------------------------------------------------
 section "SIMD Vectors"
 	{Operations on SIMD vectors.}
diff --git a/utils/genprimopcode/Main.hs b/utils/genprimopcode/Main.hs
index d60081f..05d42fa 100644
--- a/utils/genprimopcode/Main.hs
+++ b/utils/genprimopcode/Main.hs
@@ -252,6 +252,7 @@ gen_hs_source (Info defaults entries) =
     ++ "{-\n"
         ++ unlines (map opt defaults)
     ++ "-}\n"
+    ++ "import GHC.Types (Coercible)\n"
         ++ unlines (concatMap ent entries') ++ "\n\n\n"
      where entries' = concatMap desugarVectorSpec entries
 



More information about the ghc-commits mailing list