Renamed the listify methods to be shorter

This commit is contained in:
Neil Brown 2008-12-14 17:05:41 +00:00
parent cdcbebd2ae
commit 2b05480889

View File

@ -83,14 +83,14 @@ applyQuery2 qfA qfB = transformSpine ops ()
where
ops = baseOp `extOpQ` qfA `extOpQ` qfB
applyListifyDepth :: PolyplateSpine t (OneOpQ (Maybe s) s) () (Maybe s) => (s -> Bool) -> t -> [s]
applyListifyDepth qf = catMaybes . flatten . fmap (fromMaybe Nothing) . transformSpine ops ()
listifyDepth :: PolyplateSpine t (OneOpQ (Maybe s) s) () (Maybe s) => (s -> Bool) -> t -> [s]
listifyDepth qf = catMaybes . flatten . fmap (fromMaybe Nothing) . transformSpine ops ()
where
qf' x = if qf x then Just x else Nothing
ops = baseOp `extOpQ` qf'
applyListifyBreadth :: PolyplateSpine t (OneOpQ (Maybe s) s) () (Maybe s) => (s -> Bool) -> t -> [s]
applyListifyBreadth qf = catMaybes . (concat . levels) . fmap (fromMaybe Nothing) . transformSpine ops ()
listifyBreadth :: PolyplateSpine t (OneOpQ (Maybe s) s) () (Maybe s) => (s -> Bool) -> t -> [s]
listifyBreadth qf = catMaybes . (concat . levels) . fmap (fromMaybe Nothing) . transformSpine ops ()
where
qf' x = if qf x then Just x else Nothing
ops = baseOp `extOpQ` qf'