Instance signatures

Contents
  • Basic usage
  • Common mistakes
  • Moving signatures to the top level
  • History

The InstanceSigs GHC documentation for InstanceSigs GHC extension first appeared in GHC version 7.6.1. This extension enables explicit type signatures as part of typeclass instance declarations.

This extension is safe, and it is helpful for learning and writing code incrementally. The explicit type annotations it allows may also be useful, as explicit type annotations generally are, as documentation and for readers.

Sign up for access to the full page, plus the complete archive and all the latest content.