[GHC] #10959: MINIMAL pragma and default implementations
GHC
ghc-devs at haskell.org
Mon Oct 12 13:22:30 UTC 2015
#10959: MINIMAL pragma and default implementations
-------------------------------------+-------------------------------------
Reporter: basvandijk | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
> surely the intention of the MINIMAL pragma was to warn if we end up with
the meth = error "..." implementation that the compiler would supply if
there was no other implementation at all
Not only that. Bur also
{{{
class Eq a where
(==), (/=) :: a -> a -> Bool
(==) a b = not (a /= b)
(/=) a b = not (a == b)
}}}
Here we have code for both `(==)` and `(/=)` (no `error` here), but the
MINIMAL pragma allows you to say that you should supply a "real"
implementation for one or the other.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10959#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list