Skip to content

Misleading error with name conflicting instances #3093

@LiamGoodacre

Description

@LiamGoodacre

Depending on the order of the instances you get a different error:

{- No type class instance was found for Show A -}
newtype A = A String
derive newtype instance showX :: Show A

newtype B = B A
derive newtype instance showX :: Show B
{- The value showX has been defined multiple times -}
newtype B = B A
derive newtype instance showX :: Show B

newtype A = A String
derive newtype instance showX :: Show A

I would expect to always see the showX has been defined multiple times first.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions