
#16314: Improve confusing error message with MINIMAL pragma -------------------------------------+------------------------------------- Reporter: lerkok | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by lerkok): Another observation. I've just found out that if you try this: {{{#!hs class X a where foo :: a {-# MINIMAL #-} }}} Then GHC says: {{{ a.hs:1:1: warning: • The MINIMAL pragma does not require: ‘foo’ but there is no default implementation. • In the class declaration for ‘X’ }}} which is absolutely fantastic! So, it does implement the other side of the check. What's missing is if `MINIMAL` requires something, yet you also give a default definition for it, then it keeps quiet about it. So this request seems to fall well within the current practice of warning about these cases. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16314#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler