-listBinding (b, e) = do
- putStr "\nBinder: "
- putStr $ show b ++ "[" ++ show (Var.varUnique b) ++ "]"
- putStr "\nType of Binder: \n"
- putStr $ Outputable.showSDoc $ Outputable.ppr $ Var.varType b
- putStr "\n\nExpression: \n"
- putStr $ prettyShow e
- putStr "\n\n"
- putStr $ Outputable.showSDoc $ Outputable.ppr e
- putStr "\n\nType of Expression: \n"
- putStr $ Outputable.showSDoc $ Outputable.ppr $ CoreUtils.exprType e
- putStr "\n\n"
+listBinding (b, e) = putStr $ Outputable.showSDoc $
+ (text "Binder:") <+> (text $ show b ++ "[" ++ show (Var.varUnique b) ++ "]")
+ $+$ nest indent (
+ hang' (text "Type of Binder:") align (Outputable.ppr $ Var.varType b)
+ $+$ hang' (text "Expression:") align (text $ prettyShow e)
+ $+$ nest align (Outputable.ppr e)
+ $+$ hang' (text "Type of Expression:") align (Outputable.ppr $ CoreUtils.exprType e)
+ )
+ $+$ (text "\n") -- Add an empty line