summaryrefslogtreecommitdiff
path: root/utils/ext-core
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2008-09-12 03:33:47 +0000
committerTim Chevalier <chevalier@alum.wellesley.edu>2008-09-12 03:33:47 +0000
commite87a19501df36650835a86795fd92f9847fd9905 (patch)
tree84a31bcc547b4cf9146029de58908a48b15fe950 /utils/ext-core
parent844e0d6d6c012647851b55b0601021650604f46e (diff)
downloadhaskell-e87a19501df36650835a86795fd92f9847fd9905.tar.gz
ext-core library: Change syntax for primitive coercions
Changed the ext-core syntax to include primitive coercions (left, right, sym, trans, etc.) as syntax rather than referring them to their names as in GHC. (I hope I updated the docs to reflect this...)
Diffstat (limited to 'utils/ext-core')
-rw-r--r--utils/ext-core/Language/Core/Printer.hs13
1 files changed, 6 insertions, 7 deletions
diff --git a/utils/ext-core/Language/Core/Printer.hs b/utils/ext-core/Language/Core/Printer.hs
index 0a3e2cf7e1..bbd8e48c32 100644
--- a/utils/ext-core/Language/Core/Printer.hs
+++ b/utils/ext-core/Language/Core/Printer.hs
@@ -7,7 +7,6 @@ import Data.Char
import Language.Core.Core
import Language.Core.Encoding
-import Language.Core.PrimCoercions
instance Show Module where
showsPrec _ m = shows (pmodule m)
@@ -128,17 +127,17 @@ pbty t = paty t
pty (Tapp(Tapp(Tcon tc) t1) t2) | tc == tcArrow = fsep [pbty t1, text "->",pty t2]
pty (Tforall tb t) = text "%forall" <+> pforall [tb] t
pty (TransCoercion t1 t2) =
- (sep ([pqname transCoercion, paty t1, paty t2]))
+ (sep ([text "%trans", paty t1, paty t2]))
pty (SymCoercion t) =
- (sep [pqname symCoercion, paty t])
+ (sep [text "%sym", paty t])
pty (UnsafeCoercion t1 t2) =
- (sep [pqname unsafeCoercion, paty t1, paty t2])
+ (sep [text "%unsafe", paty t1, paty t2])
pty (LeftCoercion t) =
- (pqname leftCoercion <+> paty t)
+ (text "%left" <+> paty t)
pty (RightCoercion t) =
- (pqname rightCoercion <+> paty t)
+ (text "%right" <+> paty t)
pty (InstCoercion t1 t2) =
- (sep [pqname instCoercion, paty t1, paty t2])
+ (sep [text "%inst", paty t1, paty t2])
pty t = pbty t
pappty (Tapp t1 t2) ts = pappty t1 (t2:ts)