module Operations where -- classes of operation on non-temporal types class BinaryPredicates a where --(==),(/=) :: a -> a -> Bool -- class Eq intersects :: a -> a -> Bool inside :: a -> a -> Bool --(<),(>),(<=),(>=) :: a -> a -> Bool -- class ord touch :: a -> a -> Bool --overlap :: a -> a -> Bool --attached :: a -> a -> Bool before :: a -> a -> Bool after :: a -> a -> Bool ----------------------------------------------------------------------------------------------------- ---- Set Operations ----------------------------------------------------------- class Set a where union :: a -> a -> a intersection :: a -> a -> a minus :: a -> a -> a ----------------- Distance and Direction Operations ------------------------------------------------ class DistanceDirection a where distance :: a -> a -> Double direction :: a -> a -> Double ----------------- Aggregation ------------------------------------- class Aggregation a b where avg :: a -> b class Numeric a where size :: a -> Double