Skip to content

Conversation

@sjakobi
Copy link
Member

@sjakobi sjakobi commented Nov 29, 2025

No description provided.

@treeowl
Copy link
Collaborator

treeowl commented Nov 29, 2025

This is a breaking change, through it's unlikely to break much if any real code.

data T a = T deriving (Eq, Generic)
instance a ~ [Int] => Hashable (T a)

buh :: HashMap (T a) ()
buh = empty 

asHTof :: a -> HashMap (T a) x -> a
asHTof a _ = a

foo :: Int
foo = length (mempty `asHTof` whatever)
  where
    !whatever = buh <> buh

If you remove the Hashable constraints, this code will no longer compile.

It's possible to construct even worse scenarios using defaulting, in which it compiles both ways but with different results.

@treeowl
Copy link
Collaborator

treeowl commented Nov 29, 2025

I'm only mentioning that because it needs a major version bump along with a change log entry.

@sjakobi sjakobi added this to the 0.3 milestone Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants