[BUGFIX: nicer version of makeIOMatrix was wrong
martin.hofmann@uni-bamberg.de**20090826171638] hunk ./src/RuleDevelopment/Matching.hs 180
+-- TODO: I thought this could wokr instead of makeIOMatrix-anyResult-oneFromEachCol,
+-- but apparently it does not.
+--makeIOMatrix :: [CovrRule] -> Ordering -> [CovrRule] -> IM (Maybe [[(Ordering, [Rule])]])
+--makeIOMatrix tgtrs o cllrs = nothingIfAnyEmpty
+--    [ nothingIfAnyEmpty [abduceIO t o c | t <- tgtrs ] | c <- cllrs]
+--    where
+--    nothingIfAnyEmpty = (liftM sequence) . sequence
+    
hunk ./src/RuleDevelopment/Matching.hs 189
-makeIOMatrix tgtrs o cllrs = nothingIfAnyEmpty
-    [ nothingIfAnyEmpty [abduceIO t o c | t <- tgtrs ] | c <- cllrs]
-    where
-    nothingIfAnyEmpty = (liftM sequence) . sequence
+makeIOMatrix tgtrs o cllrs =
+    liftM sequence $ sequence [ anyResult [abduceIO t o c | t <- tgtrs ] | c <- cllrs]
hunk ./src/RuleDevelopment/Matching.hs 192
+anyResult :: [IM (Maybe a)] -> IM (Maybe [a])
+anyResult = (liftM ((\l -> if (null l) then Nothing else (Just l)).catMaybes)).sequence
+
+oneFromEachCol []    = [[]]
+oneFromEachCol (x:xs)= [e:es | e <- x, es <- (oneFromEachCol xs)]