projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2004-08-02 18:23:25 by panne]
[ghc-hetmet.git]
/
ghc
/
compiler
/
coreSyn
/
PprExternalCore.lhs
diff --git
a/ghc/compiler/coreSyn/PprExternalCore.lhs
b/ghc/compiler/coreSyn/PprExternalCore.lhs
index
16acc68
..
871f43c
100644
(file)
--- a/
ghc/compiler/coreSyn/PprExternalCore.lhs
+++ b/
ghc/compiler/coreSyn/PprExternalCore.lhs
@@
-3,7
+3,7
@@
%
\begin{code}
%
\begin{code}
-module PprExternalCore where
+module PprExternalCore () where
import Pretty
import ExternalCore
import Pretty
import ExternalCore
@@
-39,24
+39,17
@@
instance Show Lit where
indent = nest 2
indent = nest 2
-pmodule (Module mname {- (texports,dexports,vexports) -} tdefs vdefs) =
+pmodule (Module mname tdefs vdefgs) =
(text "%module" <+> text mname)
(text "%module" <+> text mname)
-{- $$ indent (parens (((fsep (map pname texports) <> char ',')
- $$ (fsep (map pname dexports) <> char ',')
- $$ (fsep (map pname vexports))))
--}
$$ indent ((vcat (map ((<> char ';') . ptdef) tdefs))
$$ indent ((vcat (map ((<> char ';') . ptdef) tdefs))
- $$ (vcat (map ((<> char ';') . pgvdef) vdefs)))
-
-pgvdef (False,vdef) = text "%local" <+> pvdefg vdef
-pgvdef (True,vdef) = pvdefg vdef
+ $$ (vcat (map ((<> char ';') . pvdefg) vdefgs)))
ptdef (Data tcon tbinds cdefs) =
ptdef (Data tcon tbinds cdefs) =
- (text "%data" <+> pname tcon <+> (hsep (map ptbind tbinds)) <+> char '=')
+ (text "%data" <+> pqname tcon <+> (hsep (map ptbind tbinds)) <+> char '=')
$$ indent (braces ((vcat (punctuate (char ';') (map pcdef cdefs)))))
ptdef (Newtype tcon tbinds rep ) =
$$ indent (braces ((vcat (punctuate (char ';') (map pcdef cdefs)))))
ptdef (Newtype tcon tbinds rep ) =
- text "%newtype" <+> pname tcon <+> (hsep (map ptbind tbinds)) <+> repclause
+ text "%newtype" <+> pqname tcon <+> (hsep (map ptbind tbinds)) <+> repclause
where repclause = case rep of
Just ty -> char '=' <+> pty ty
Nothing -> empty
where repclause = case rep of
Just ty -> char '=' <+> pty ty
Nothing -> empty
@@
-67,7
+60,7
@@
pcdef (Constr dcon tbinds tys) =
pname id = text id
pqname ("",id) = pname id
pname id = text id
pqname ("",id) = pname id
-pqname (m,id) = pname m <> char '.' <> pname id
+pqname (m,id) = pname m <> char '.' <> pname id
ptbind (t,Klifted) = pname t
ptbind (t,k) = parens (pname t <> text "::" <> pkind k)
ptbind (t,Klifted) = pname t
ptbind (t,k) = parens (pname t <> text "::" <> pkind k)