[commit: ghc] master, master: Remove support for "primclass" (5d59265)

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


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

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

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

commit 5d59265acf6c61840e386842c506241f9e48f1ae
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Sun Mar 16 18:39:27 2014 +0100

    Remove support for "primclass"
    
    This partly reverts commit e239753c349f925b576b72dc3445934cba8bcd50. Since
    Coercible is exported via GHC.Types, so "primclass" is no longer
    needed. The support for => in primops.pp is still required for coerce.


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

5d59265acf6c61840e386842c506241f9e48f1ae
 utils/genprimopcode/Lexer.x    |    1 -
 utils/genprimopcode/Main.hs    |   12 ------------
 utils/genprimopcode/Parser.y   |    6 ------
 utils/genprimopcode/ParserM.hs |    1 -
 utils/genprimopcode/Syntax.hs  |    3 ---
 5 files changed, 23 deletions(-)

diff --git a/utils/genprimopcode/Lexer.x b/utils/genprimopcode/Lexer.x
index a796b8a..527a03f 100644
--- a/utils/genprimopcode/Lexer.x
+++ b/utils/genprimopcode/Lexer.x
@@ -48,7 +48,6 @@ words :-
     <0>         "primop"            { mkT TPrimop }
     <0>         "pseudoop"          { mkT TPseudoop }
     <0>         "primtype"          { mkT TPrimtype }
-    <0>         "primclass"         { mkT TPrimclass }
     <0>         "with"              { mkT TWith }
     <0>         "defaults"          { mkT TDefaults }
     <0>         "True"              { mkT TTrue }
diff --git a/utils/genprimopcode/Main.hs b/utils/genprimopcode/Main.hs
index 05d42fa..c9d0d9c 100644
--- a/utils/genprimopcode/Main.hs
+++ b/utils/genprimopcode/Main.hs
@@ -269,8 +269,6 @@ gen_hs_source (Info defaults entries) =
            hdr (PseudoOpSpec { name = n })                       = wrapOp n ++ ","
            hdr (PrimTypeSpec { ty = TyApp (TyCon n) _ })         = wrapTy n ++ ","
            hdr (PrimTypeSpec {})                                 = error $ "Illegal type spec"
-           hdr (PrimClassSpec { cls = TyApp (TyCon n) _ })       = wrapTy n ++ ","
-           hdr (PrimClassSpec {})                                = error "Illegal class spec"
            hdr (PrimVecTypeSpec { ty = TyApp (VecTyCon n _) _ }) = wrapTy n ++ ","
            hdr (PrimVecTypeSpec {})                              = error $ "Illegal type spec"
 
@@ -278,7 +276,6 @@ gen_hs_source (Info defaults entries) =
            ent o@(PrimOpSpec {})      = spec o
            ent o@(PrimVecOpSpec {})   = spec o
            ent o@(PrimTypeSpec {})    = spec o
-           ent o@(PrimClassSpec {})   = spec o
            ent o@(PrimVecTypeSpec {}) = spec o
            ent o@(PseudoOpSpec {})    = spec o
 
@@ -302,8 +299,6 @@ gen_hs_source (Info defaults entries) =
                               wrapOp n ++ " = let x = x in x" ]
                         PrimTypeSpec { ty = t }   ->
                             [ "data " ++ pprTy t ]
-                        PrimClassSpec { cls = t }   ->
-                            [ "class " ++ pprTy t ]
                         PrimVecTypeSpec { ty = t }   ->
                             [ "data " ++ pprTy t ]
                         Section { } -> []
@@ -497,13 +492,6 @@ gen_latex_doc (Info defaults entries)
                  ++ d ++ "}{"
                  ++ mk_options o
                  ++ "}\n"
-           mk_entry (PrimClassSpec {cls=t,desc=d,opts=o}) =
-                 "\\primclassspec{"
-                 ++ latex_encode (mk_source_ty t) ++ "}{"
-                 ++ latex_encode (mk_core_ty t) ++ "}{"
-                 ++ d ++ "}{"
-                 ++ mk_options o
-                 ++ "}\n"
            mk_entry (PrimVecTypeSpec {}) =
                  ""
            mk_entry (PseudoOpSpec {name=n,ty=t,desc=d,opts=o}) =
diff --git a/utils/genprimopcode/Parser.y b/utils/genprimopcode/Parser.y
index ef6e27e..424efe6 100644
--- a/utils/genprimopcode/Parser.y
+++ b/utils/genprimopcode/Parser.y
@@ -40,7 +40,6 @@ import Syntax
     primop          { TPrimop }
     pseudoop        { TPseudoop }
     primtype        { TPrimtype }
-    primclass       { TPrimclass }
     with            { TWith }
     defaults        { TDefaults }
     true            { TTrue }
@@ -99,7 +98,6 @@ pEntries : pEntry pEntries { $1 : $2 }
 pEntry :: { Entry }
 pEntry : pPrimOpSpec   { $1 }
        | pPrimTypeSpec { $1 }
-       | pPrimClassSpec { $1 }
        | pPseudoOpSpec { $1 }
        | pSection      { $1 }
 
@@ -120,10 +118,6 @@ pPrimTypeSpec :: { Entry }
 pPrimTypeSpec : primtype pType pDesc pWithOptions
                 { PrimTypeSpec { ty = $2, desc = $3, opts = $4 } }
 
-pPrimClassSpec :: { Entry }
-pPrimClassSpec : primclass pType pDesc pWithOptions
-                { PrimClassSpec { cls = $2, desc = $3, opts = $4 } }
-
 pPseudoOpSpec :: { Entry }
 pPseudoOpSpec : pseudoop string pType pDesc pWithOptions
                 { PseudoOpSpec { name = $2, ty = $3, desc = $4, opts = $5 } }
diff --git a/utils/genprimopcode/ParserM.hs b/utils/genprimopcode/ParserM.hs
index 0a69db6..4dedfa3 100644
--- a/utils/genprimopcode/ParserM.hs
+++ b/utils/genprimopcode/ParserM.hs
@@ -83,7 +83,6 @@ data Token = TEOF
            | TPrimop
            | TPseudoop
            | TPrimtype
-           | TPrimclass
            | TWith
            | TDefaults
            | TTrue
diff --git a/utils/genprimopcode/Syntax.hs b/utils/genprimopcode/Syntax.hs
index d0c380c..68b20ad 100644
--- a/utils/genprimopcode/Syntax.hs
+++ b/utils/genprimopcode/Syntax.hs
@@ -35,9 +35,6 @@ data Entry
     | PrimTypeSpec { ty    :: Ty,      -- name in prog text
                      desc  :: String,      -- description
                      opts  :: [Option] }   -- default overrides
-    | PrimClassSpec { cls   :: Ty,      -- name in prog text
-                      desc  :: String,      -- description
-                      opts  :: [Option] }   -- default overrides
     | PrimVecTypeSpec { ty    :: Ty,      -- name in prog text
                         prefix  :: String,    -- prefix for generated names
                         veclen  :: Int,       -- vector length



More information about the ghc-commits mailing list