]> hydra-www.ietfng.org Git - dyna2/commitdiff
Stop being quite so ambitious in Analysis.RuleMode.inv
authorNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Thu, 13 Dec 2012 03:05:32 +0000 (22:05 -0500)
committerNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Thu, 13 Dec 2012 03:05:32 +0000 (22:05 -0500)
src/Dyna/Analysis/RuleMode.hs

index e0c9f57a74136bee44bb6c23f20e97b7c52ac6cf..399bbde84971791c0b0776e1d734d7675960677c 100644 (file)
@@ -254,13 +254,11 @@ possible cr = case cr of
 
   -- XXX this really ought to be done some other way
   inv :: DFunct -> [ModedVar] -> ModedVar -> [Action]
-  inv "+" is (MB o)
-               = case L.partition isFree is of
-                   ([MF fi],bis) -> let cv = "_tmp"
-                                        bis' = map varOfMV bis
-                                    in  [[ OPCall cv bis' "+"
-                                         , OPCall fi [o, cv] "-"]]
-                   _ -> []
+  inv "+" is [(MB x), (MF y)] (MB o)
+                  = [[ OPCall y [o,x] "-" ]]
+
+  inv "+" is [(MF x), (MB y)] (MB o)
+                  = [[ OPCall x [o,y] "-" ]]
 
   inv "-" [(MB x),(MF y)] (MB o)
                   = [[ OPCall y [x,o] "-" ]]