validate :: [Declaration] -> Either Error File
validate decls = case safeSet $ names decls of
  Left dup -> Left $ DuplicateDeclaration dup
  Right _ -> Right decls
validate :: [Declaration] -> Either Error File
validate decls = case safeSet $ names decls of
  Left dup -> Left $ DuplicateDeclaration dup
  Right _ -> Right decls
validate decls = case safeSet $ names decls of
  Left dup -> Left $ DuplicateDeclaration dup
  Right _ -> Right decls