Changed a little code to use the more appropriate fromMaybe function rather than maybe

This commit is contained in:
Neil Brown 2008-01-27 18:37:02 +00:00
parent 349d3c5811
commit 1cc731a7d8

View File

@ -59,7 +59,7 @@ checkArrayUsage graph = sequence_ $ checkPar checkArrayUsage' graph
groupArrayIndexes vs = filterByKey $ transformParItems (uncurry (zipMap join) . (transformPair (makeList . writtenVars) (makeList . readVars)) . mkPair) vs
where
join :: Maybe [a] -> Maybe [a] -> Maybe ([a],[a])
join x y = Just (maybe [] id x, maybe [] id y)
join x y = Just (fromMaybe [] x, fromMaybe [] y)
flattenParItems :: ParItems a -> [a]
flattenParItems (SeqItems xs) = xs