
#12907: ExtendedDefaultRules-related regression in GHC 8.0.2 -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler (Type | Version: 8.0.2-rc1 checker) | 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 hvr): Just for the record, I consider this GHC being faithful to H2010 when it rejects the code {{{#!hs module Bug where default (Bool) }}} since [https://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-790004.... 4.3.4] says:
Ambiguities in the class Num are most common, so Haskell provides another way to resolve them—with a default declaration: default (t1 , … , tn) where n ≥ 0, and each ti must be a type for which Num ti holds.
And `Bool` is not an instance of `Num`, hence the code above is not legal plain Haskell2010 code. Personally, I consider this a bugfix rather than a regression :-) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12907#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler