Implement checkable "minimal complete definitions" (#7633)
authorTwan van Laarhoven <twanvl@gmail.com>
Wed, 11 Sep 2013 13:32:33 +0000 (15:32 +0200)
committerHerbert Valerio Riedel <hvr@gnu.org>
Wed, 18 Sep 2013 07:53:18 +0000 (09:53 +0200)
commitbd42c9dfd1c9ce19672e1d63871a237c268e0212
tree0d9e6e3fdedae39176751cc62c1458344a0cf781
parentb6bc3263d0099e79b437ac5f3c053452c608c710
Implement checkable "minimal complete definitions" (#7633)

This commit adds a `{-# MINIMAL #-}` pragma, which defines the possible
minimal complete definitions for a class. The body of the pragma is a
boolean formula of names.

The old warning for missing methods is replaced with this new one.

Note: The interface file format is changed to store the minimal complete
definition.

Authored-by: Twan van Laarhoven <twanvl@gmail.com>
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
19 files changed:
compiler/ghc.cabal.in
compiler/ghc.mk
compiler/hsSyn/HsBinds.lhs
compiler/iface/BuildTyCl.lhs
compiler/iface/IfaceSyn.lhs
compiler/iface/MkIface.lhs
compiler/iface/TcIface.lhs
compiler/parser/Lexer.x
compiler/parser/Parser.y.pp
compiler/prelude/TysWiredIn.lhs
compiler/rename/RnBinds.lhs
compiler/typecheck/TcClassDcl.lhs
compiler/typecheck/TcInstDcls.lhs
compiler/typecheck/TcTyClsDecls.lhs
compiler/types/Class.lhs
compiler/utils/BooleanFormula.hs [new file with mode: 0644]
compiler/vectorise/Vectorise/Type/TyConDecl.hs
docs/users_guide/glasgow_exts.xml
docs/users_guide/using.xml