[commit: ghc] master: Make note of #12881 in 8.0.2 release notes (abd4a4c)

git at git.haskell.org git at git.haskell.org
Tue Nov 29 13:49:33 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/abd4a4c13e5dbaac8f1c28d8c9d9446e383f6037/ghc

>---------------------------------------------------------------

commit abd4a4c13e5dbaac8f1c28d8c9d9446e383f6037
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Tue Nov 29 08:43:46 2016 -0500

    Make note of #12881 in 8.0.2 release notes
    
    Summary: Resolves #12881.
    
    Test Plan: Read it, commit it, merge it, ship it
    
    Reviewers: hvr, simonpj, austin, bgamari
    
    Reviewed By: simonpj
    
    Subscribers: simonpj, thomie
    
    Differential Revision: https://phabricator.haskell.org/D2760
    
    GHC Trac Issues: #12881


>---------------------------------------------------------------

abd4a4c13e5dbaac8f1c28d8c9d9446e383f6037
 docs/users_guide/8.0.2-notes.rst | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/docs/users_guide/8.0.2-notes.rst b/docs/users_guide/8.0.2-notes.rst
index 34cc4b5..b28b923 100644
--- a/docs/users_guide/8.0.2-notes.rst
+++ b/docs/users_guide/8.0.2-notes.rst
@@ -50,6 +50,21 @@ Language
    type-checked in GHC 8.0.1 are now rejected by GHC 8.0.2. See
    :ghc-ticket:`12784` for details.
 
+-  Some programs which combine default type class method implementations and
+   overlapping instances may now fail to type-check. Here is an example: ::
+
+      class Foo a where
+        foo :: a -> [a]
+        foo _ = []
+
+      instance Foo a
+      instance Foo Int
+
+   The problem is that the overlapping ``Foo Int`` instance is not explicitly
+   marked as overlapping. To fix this, simply add an ``OVERLAPPING`` pragma: ::
+
+      instance {-# OVERLAPPING #-} Foo Int
+
 Compiler
 ~~~~~~~~
 



More information about the ghc-commits mailing list