From 553e19f5940d9cff70b2d04b6c6b23cd8f41eef2 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Fri, 28 Jun 2013 01:48:56 -0400 Subject: [PATCH] Add ruleix=N printouts to dump headers --- src/Dyna/Main/Driver.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Dyna/Main/Driver.hs b/src/Dyna/Main/Driver.hs index 605629a..246a4c0 100644 --- a/src/Dyna/Main/Driver.hs +++ b/src/Dyna/Main/Driver.hs @@ -265,6 +265,7 @@ renderDopUpds ddi um = vsep $ flip map (M.toList um) $ \(fa,ps) -> planHeader r (fa :: Maybe DFunctAr) n c (vi,vo) = text ";;" <+> (prettySpanLoc $ r_span r) + <+> text "ruleix=" <> pretty (r_index r) <+> text "fa=" <> maybe empty (\(f,a) -> pretty f <> text "/" <> pretty a) fa @@ -282,6 +283,7 @@ renderDopInis ddi im = vsep $ flip map im $ \(r,c,ps) -> iniHeader r c = text ";;" <+> (prettySpanLoc $ r_span r) + <+> text "ruleix=" <> pretty (r_index r) <+> text "cost=" <> pretty c <+> text "head=" <> pretty (r_head r) <+> text "res=" <> pretty (r_result r) @@ -289,17 +291,20 @@ renderDopInis ddi im = vsep $ flip map im $ \(r,c,ps) -> renderFailedInit rd (r,ps) = text ";; failed initialization attempts for" (prettySpanLoc $ r_span r) + <+> text "ruleix=" <> pretty (r_index r) indent 2 (vsep $ map (renderPartialPlan rd) ps) renderFailedUpdate rd (r,i,ps) = text ";; failed update plans for" (prettySpanLoc $ r_span r) - <+> (text "evalix=" <> pretty i) + <+> text "ruleix=" <> pretty (r_index r) + <+> (text "evalix=" <> pretty i) indent 2 (vsep $ map (renderPartialPlan rd) ps) renderFailedQuery rd (r,pbce) = text ";; failed query attempts for" (prettySpanLoc $ r_span r) + <+> text "ruleix=" <> pretty (r_index r) case pbce of PBCWrongFunctor f -> "wrong functor" <+> squotes (pretty f) -- 2.50.1