diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2008-03-28 22:26:30 +0000 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2008-03-28 22:26:30 +0000 |
| commit | f555abffd676544cd13d022bf1eb829e63f7aebe (patch) | |
| tree | d321f5a7be7b9f756edf4a01446db016fdc6f527 | |
| parent | 0a9b1362c9103c17a9f662287fd65c8779bcf4ef (diff) | |
| download | haskell-f555abffd676544cd13d022bf1eb829e63f7aebe.tar.gz | |
External Core: print function types correctly, improve newtype pretty-printing
- In a previous patch I broke the printing of fully-applied arrow
types (e.g., "a -> b" was "(ghczmprim:GHCziPrim a b)") by z-encoding
package names and not updating the primitive module name as defined in
External Core accordingly. Fixed. (Mega sigh...)
- Make newtype decls print slightly more readably.
| -rw-r--r-- | compiler/coreSyn/ExternalCore.lhs | 2 | ||||
| -rw-r--r-- | compiler/coreSyn/PprExternalCore.lhs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/coreSyn/ExternalCore.lhs b/compiler/coreSyn/ExternalCore.lhs index 5754f844bc..2a8d152fe6 100644 --- a/compiler/coreSyn/ExternalCore.lhs +++ b/compiler/coreSyn/ExternalCore.lhs @@ -86,7 +86,7 @@ type Id = String primMname :: Mname -- For truly horrible reasons, this must be z-encoded. -- With any hope, the z-encoding will die soon. -primMname = "ghc-prim:GHCziPrim" +primMname = "ghczmprim:GHCziPrim" tcArrow :: Qual Tcon tcArrow = (primMname, "(->)") diff --git a/compiler/coreSyn/PprExternalCore.lhs b/compiler/coreSyn/PprExternalCore.lhs index dd75b62629..791e36b83d 100644 --- a/compiler/coreSyn/PprExternalCore.lhs +++ b/compiler/coreSyn/PprExternalCore.lhs @@ -61,7 +61,7 @@ ptdef (Newtype tcon tbinds (coercion,k) rep) = -- At the same time, we need the newtype decl to declare the tycon itself. -- Sigh. text "%newtype" <+> pqname tcon <+> (hsep (map ptbind tbinds)) - <+> axiomclause <+> repclause + $$ indent (axiomclause $$ repclause) where axiomclause = char '^' <+> parens (pqname coercion <+> text "::" <+> pkind k) repclause = case rep of |
