mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Test whether Categorizable values are comparable.
This commit is contained in:
parent
f1eed7dac2
commit
fba97d256b
@ -4,3 +4,6 @@ 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)
|
||||
|
Loading…
Reference in New Issue
Block a user