Skip to content

Commit

Permalink
Basic explanation of 59692
Browse files Browse the repository at this point in the history
  • Loading branch information
noughtmare authored Aug 4, 2024
1 parent 1965425 commit 0823435
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions message-index/messages/GHC-59692/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Duplicate instance declarations
summary: An instance has been defined twice for the same type.
introduced: 9.6.1
severity: error
---

You can only define a single instance for every type, because it must be possible to automatically resolve class constraints without any ambiguity.

Note that instances are considered the same even if they have different constraints. Only the arguments of the class are considered when matching instances.

See the [GHC User Guide](https://downloads.haskell.org/~ghc/9.10.1/docs/users_guide/exts/instances.html) for more information on instance declarations and resolution.

0 comments on commit 0823435

Please sign in to comment.