This commit is contained in:
Simon Michael 2007-07-02 23:54:17 +00:00
parent 91735f4f3c
commit e7d36bb40e

View File

@ -1,3 +1,4 @@
-- standard imports and utilities
module Utils (
module Utils,
module Data.List,
@ -18,6 +19,8 @@ import Test.QuickCheck hiding (test, Testable)
import Test.HUnit
-- lists
splitAtElement :: Eq a => a -> [a] -> [[a]]
splitAtElement e l =
case dropWhile (e==) l of
@ -26,7 +29,7 @@ splitAtElement e l =
where
(first,rest) = break (e==) l'
-- tree tools
-- trees
-- aliases
root = rootLabel
@ -56,7 +59,5 @@ treeany f t = (f $ root t) || (any (treeany f) $ branches t)
-- debugging
strace a = trace (show a) a
-- testing
strace a = trace (show a) a -- trace a showable expression