1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00
semantic/src/Categorizable.hs

10 lines
230 B
Haskell
Raw Normal View History

2015-11-18 22:23:28 +03:00
module Categorizable where
2015-11-18 22:23:35 +03:00
import Data.Set
class Categorizable a where
categories :: a -> Set String
comparable :: Categorizable a => a -> a -> Bool
comparable a b = Data.Set.null $ intersection (categories a) (categories b)