- pPrint (VHDLSession nameCount funcs) =
- text "NameCount: " $$ nest 15 (int nameCount)
- $+$ text "Functions: " $$ nest 15 (vcat (map ppfunc funcs))
+ pPrint (VHDLSession mod nameCount funcs) =
+ text "Module: " $$ nest 15 (text modname)
+ $+$ text "NameCount: " $$ nest 15 (int nameCount)
+ $+$ text "Functions: " $$ nest 15 (vcat (map ppfunc (Map.toList funcs)))
+ where
+ ppfunc (hsfunc, (FuncData flatfunc entity)) =
+ pPrint hsfunc $+$ (text "Flattened: " $$ nest 15 (ppffunc flatfunc))
+ $+$ (text "Entity") $$ nest 15 (ppent entity)
+ ppffunc (Just f) = pPrint f
+ ppffunc Nothing = text "Nothing"
+ ppent (Just e) = pPrint e
+ ppent Nothing = text "Nothing"
+ modname = showSDoc $ Module.pprModule (HscTypes.cm_module mod)
+
+instance Pretty Entity where
+ pPrint (Entity args res decl) =
+ text "Args: " $$ nest 10 (pPrint args)
+ $+$ text "Result: " $$ nest 10 (pPrint res)
+ $+$ ppdecl decl