Skip to content

Migration advice for hashable-1.4 #232

@sjakobi

Description

@sjakobi

What's the best way to make code -Wredundant-constraints-clean with hashable-1.4 while retaining compatibility with hashable < 1.4?

In unordered-containers, I'd rather not have CPP-conditionals on every function that so far required both Eq and Hashable, like this:

f ::
#if MIN_VERSION_hashable(1,4,0)
  (Hashable k)
#else 
  (Eq k, Hashable k)
#endif
  => bla k

Is there a recommended way to achieve the same effect with less visual noise?

(CC @treeowl)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions