, "'''"]
printInitializer :: Handle -> Rule -> Cost -> Actions PyDopeBS -> IO ()
-printInitializer fh rule@(Rule _ h _ r _ _ ucruxes _) cost dope = do
+printInitializer fh rule cost dope = do
displayIO fh $ renderPretty 1.0 100
- $ "@_initializers.append" -- <> (uncurry pfa $ MA.fromJust $ findHeadFA h ucruxes)
- `above` "def" <+> char '_' <> tupled ["emit"] <> colon
+ $ "def" <+> char '_' <> tupled ["emit"] <> colon
`above` (indent 4 $ printPlanHeader rule cost Nothing)
`above` pdope dope
<> line
+ <> "_initializers.append((" <> (pretty $ r_index rule) <> ", _" <> "))"
+ <> line
+ <> line
+ <> line
+printUpdate :: Handle -> Rule -> Cost -> Int -> Maybe DFunctAr -> (DVar, DVar)
+ -> Actions PyDopeBS -> IO ()
-- XXX INDIR EVAL
-printUpdate :: Handle -> Rule -> Cost -> Int -> Maybe DFunctAr -> (DVar, DVar) -> Actions PyDopeBS -> IO ()
-printUpdate fh rule@(Rule _ h _ r _ _ _ _) cost evalix (Just (f,a)) (hv,v) dope = do
+printUpdate _ _ _ _ Nothing _ _ =
+ dynacPanic "Python backend does not know how to do indirect evaluations"
+printUpdate fh rule cost evalix (Just (f,a)) (hv,v) dope = do
displayIO fh $ renderPretty 1.0 100
$ "#" <+> (pfa f a)
`above` "def" <+> char '_' <> tupled (map pretty [hv,v,"emit"]) <> colon