[project @ 2000-11-22 17:51:16 by simonmar]
[ghc-hetmet.git] / ghc / compiler / ghci / InterpSyn.lhs
index a458fde..61ca4ab 100644 (file)
@@ -72,7 +72,7 @@ data IExpr con var
    | ConAppI   con (IExpr con var)
    | ConAppP   con (IExpr con var)
    | ConAppPP  con (IExpr con var) (IExpr con var)
-   | ConAppPPP con (IExpr con var) (IExpr con var) (IExpr con var)
+   | ConAppGen con [IExpr con var]
 
    | PrimOpP PrimOp [(IExpr con var)]
    | PrimOpI PrimOp [(IExpr con var)]
@@ -165,7 +165,7 @@ showExprTag expr
         ConAppI _ _       -> "ConAppI"
         ConAppP _ _       -> "ConAppP"
         ConAppPP _ _ _    -> "ConAppPP"
-        ConAppPPP _ _ _ _ -> "ConAppPPP"
+        ConAppGen _ _     -> "ConAppGen"
 
         PrimOpP _ _       -> "PrimOpP"
         PrimOpI _ _       -> "PrimOpI"
@@ -305,11 +305,14 @@ pprIExpr (expr:: IExpr con var)
         NonRecP bind body -> doNonRec 'P' bind body
        NonRecI bind body -> doNonRec 'I' bind body
 
+       RecP binds body -> doRec 'P' binds body
+       RecI binds body -> doRec 'I' binds body
+
         ConApp    i          -> doConApp "" i ([] :: [IExpr con var])
         ConAppI   i a1       -> doConApp "" i [a1]
         ConAppP   i a1       -> doConApp "" i [a1]
         ConAppPP  i a1 a2    -> doConApp "" i [a1,a2]
-        ConAppPPP i a1 a2 a3 -> doConApp "" i [a1,a2,a3]
+        ConAppGen i args     -> doConApp "" i args
 
         other     -> text "pprIExpr: unimplemented tag:" 
                      <+> text (showExprTag other)
@@ -324,6 +327,10 @@ pprIExpr (expr:: IExpr con var)
         doNonRec repchr bind body
            = vcat [text "let" <> char repchr <+> pprIBind bind, text "in", pprIExpr body]
 
+       doRec repchr binds body
+          = vcat [text "letrec" <> char repchr <+> vcat (map pprIBind binds),
+               text "in", pprIExpr body]
+
         doCasePrim repchr b sc alts def
            = sep [text "CasePrim" <> char repchr 
                      <+> pprIExpr sc <+> text "of" <+> ppr b <+> char '{',