Add a modFunc function to edit a function in the session.
[matthijs/master-project/cλash.git] / Pretty.hs
index 74ffec79cc52f268ef6217b3a66d5e05f2c944b9..21a3795ff6b71986f2d5bc897a2c844af16c8ae8 100644 (file)
--- a/Pretty.hs
+++ b/Pretty.hs
@@ -52,7 +52,9 @@ instance Pretty VHDLSession where
     $+$ text "Functions: " $$ nest 15 (vcat (map ppfunc (Map.toList funcs)))
     where
       ppfunc (hsfunc, (FuncData flatfunc)) =
-        pPrint hsfunc $+$ (text "Flattened: " $$ nest 15 (pPrint flatfunc))
+        pPrint hsfunc $+$ (text "Flattened: " $$ nest 15 (ppffunc flatfunc))
+      ppffunc (Just f) = pPrint f
+      ppffunc Nothing  = text "Nothing"
       modname = showSDoc $ Module.pprModule (HscTypes.cm_module mod)
 
 instance (OutputableBndr b) => Pretty (CoreSyn.Bind b) where