{-# LANGUAGE TypeFamilies, TypeOperators #-} -- | As simple as it looks: an edge type constructor that performs comparisons only on its key. module Data.Queue.TrieQueue.Edge ((:-)(..)) where data k :- m = k :- m deriving (Show) instance Eq k => Eq (k :- m) where (x :- _) == (y :- _) = x == y instance Ord k => Ord (k :- m) where (x :- _) `compare` (y :- _) = x `compare` y (x :- _) <= (y :- _) = x <= y