[GHC] #12907: ExtendedDefaultRules-related regression in GHC 8.0.2
GHC
ghc-devs at haskell.org
Thu Dec 1 01:51:53 UTC 2016
#12907: ExtendedDefaultRules-related regression in GHC 8.0.2
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner:
Type: bug | Status: new
Priority: high | Milestone: 8.0.2
Component: Compiler | Version: 8.0.2-rc1
(Type checker) |
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Commit
https://git.haskell.org/ghc.git/commit/9a34bf1985035858ece043bf38b47b6ff4b88efb
introduced a regression between GHC 8.0.1 and 8.0.2 regarding the behavior
of `ExtendedDefaultRules`. In GHC 8.0.1, this program
{{{#!hs
module Bug where
default (Bool)
}}}
would compile without issue. On GHC 8.0.2, however, it is rejected with
this error message:
{{{
$ /opt/ghc/8.0.2/bin/ghc Bug.hs
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
Bug.hs:3:1: error:
• The default type ‘Bool’ is not an instance of ‘Num’
• When checking the types in a default declaration
}}}
As a result, the `shelly` library now fails to compile with GHC 8.0.2 (see
https://github.com/yesodweb/Shelly.hs/issues/130). A workaround is to
explicitly enable `ExtendedDefaultRules` at the top of the module.
Richard, do you understand what's going on here? I'm not sure if this is a
real regression or just GHC being more particular (admittedly, I don't
understand many of the intricacies of `ExtendedDefaultRules`).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12907>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list