cleanup
This commit is contained in:
		
							parent
							
								
									91735f4f3c
								
							
						
					
					
						commit
						e7d36bb40e
					
				
							
								
								
									
										9
									
								
								Utils.hs
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								Utils.hs
									
									
									
									
									
								
							| @ -1,3 +1,4 @@ | |||||||
|  | -- standard imports and utilities | ||||||
| module Utils ( | module Utils ( | ||||||
|               module Utils, |               module Utils, | ||||||
|               module Data.List, |               module Data.List, | ||||||
| @ -18,6 +19,8 @@ import Test.QuickCheck hiding (test, Testable) | |||||||
| import Test.HUnit | import Test.HUnit | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | -- lists | ||||||
|  | 
 | ||||||
| splitAtElement :: Eq a => a -> [a] -> [[a]] | splitAtElement :: Eq a => a -> [a] -> [[a]] | ||||||
| splitAtElement e l =  | splitAtElement e l =  | ||||||
|     case dropWhile (e==) l of |     case dropWhile (e==) l of | ||||||
| @ -26,7 +29,7 @@ splitAtElement e l = | |||||||
|         where |         where | ||||||
|           (first,rest) = break (e==) l' |           (first,rest) = break (e==) l' | ||||||
| 
 | 
 | ||||||
| -- tree tools | -- trees | ||||||
| 
 | 
 | ||||||
| -- aliases | -- aliases | ||||||
| root = rootLabel | root = rootLabel | ||||||
| @ -56,7 +59,5 @@ treeany f t = (f $ root t) || (any (treeany f) $ branches t) | |||||||
| 
 | 
 | ||||||
| -- debugging | -- debugging | ||||||
| 
 | 
 | ||||||
| strace a = trace (show a) a | strace a = trace (show a) a -- trace a showable expression | ||||||
| 
 |  | ||||||
| -- testing |  | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user