[project @ 2003-11-06 17:09:50 by simonpj]
[ghc-hetmet.git] / ghc / compiler / hsSyn / HsExpr.lhs
index 879b3ec..e484ad7 100644 (file)
@@ -191,8 +191,6 @@ data HsExpr id
                                        -- The id is just a unique name to 
                                        -- identify this splice point
 
-  | HsReify (HsReify id)               -- reifyType t, reifyDecl i, reifyFixity
-
   -----------------------------------------------------------
   -- Arrow notation extension
 
@@ -443,7 +441,6 @@ ppr_expr (HsType id) = ppr id
 ppr_expr (HsSplice n e _)    = char '$' <> brackets (ppr n) <> pprParendExpr e
 ppr_expr (HsBracket b _)     = pprHsBracket b
 ppr_expr (HsBracketOut e ps) = ppr e $$ ptext SLIT("where") <+> ppr ps
-ppr_expr (HsReify r)        = ppr r
 
 ppr_expr (HsProc pat (HsCmdTop cmd _ _ _) _)
   = hsep [ptext SLIT("proc"), ppr pat, ptext SLIT("->"), pprExpr cmd]
@@ -811,10 +808,11 @@ pprComp brack stmts = brack $
 %************************************************************************
 
 \begin{code}
-data HsBracket id = ExpBr (HsExpr id)
-                 | PatBr (Pat id)
-                 | DecBr (HsGroup id)
-                 | TypBr (HsType id)
+data HsBracket id = ExpBr (HsExpr id)          -- [|  expr  |]
+                 | PatBr (Pat id)              -- [p| pat   |]
+                 | DecBr (HsGroup id)          -- [d| decls |]
+                 | TypBr (HsType id)           -- [t| type  |]
+                 | VarBr id                    -- 'x, ''T
 
 instance OutputableBndr id => Outputable (HsBracket id) where
   ppr = pprHsBracket
@@ -824,26 +822,14 @@ pprHsBracket (ExpBr e) = thBrackets empty (ppr e)
 pprHsBracket (PatBr p) = thBrackets (char 'p') (ppr p)
 pprHsBracket (DecBr d) = thBrackets (char 'd') (ppr d)
 pprHsBracket (TypBr t) = thBrackets (char 't') (ppr t)
-
+pprHsBracket (VarBr n) = char '\'' <> ppr n
+       -- Infelicity: can't show ' vs '', because
+       -- we can't ask n what its OccName is, because the 
+       -- pretty-printer for HsExpr doesn't ask for NamedThings
+       -- But the pretty-printer for names will show the OccName class
 
 thBrackets pp_kind pp_body = char '[' <> pp_kind <> char '|' <+> 
                             pp_body <+> ptext SLIT("|]")
-
-data HsReify id = Reify    ReifyFlavour id     -- Pre typechecking
-               | ReifyOut ReifyFlavour Name    -- Post typechecking
-                                               -- The Name could be the name of
-                                               -- an Id, TyCon, or Class
-
-data ReifyFlavour = ReifyDecl | ReifyType | ReifyFixity
-
-instance Outputable id => Outputable (HsReify id) where
-   ppr (Reify flavour id) = ppr flavour <+> ppr id
-   ppr (ReifyOut flavour thing) = ppr flavour <+> ppr thing
-
-instance Outputable ReifyFlavour where
-   ppr ReifyDecl   = ptext SLIT("reifyDecl")
-   ppr ReifyType   = ptext SLIT("reifyType")
-   ppr ReifyFixity = ptext SLIT("reifyFixity")
 \end{code}
 
 %************************************************************************