-- * Utils

uniques :: Ord b => (b -> c) -> (a -> [b]) -> [a] -> [c]
uniques convert extract =
  ( map convert
  . S.toList
  . S.unions
  . map
    ( S.fromList
    . extract
    )
  )
uniques :: Ord b => (b -> c) -> (a -> [b]) -> [a] -> [c]
uniques convert extract =
  ( map convert
  . S.toList
  . S.unions
  . map
    ( S.fromList
    . extract
    )
  )
uniques convert extract =
  ( map convert
  . S.toList
  . S.unions
  . map
    ( S.fromList
    . extract
    )
  )