From 0007a5adc2460ec3bca4b86eda670a93bf91c3c3 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Mon, 15 Oct 2012 20:03:43 +0200 Subject: Add test case for "spurious superclass constraints bug" --- html-test/ref/SpuriousSuperclassConstraints.html | 128 +++++++++++++++++++++ .../ref/mini_SpuriousSuperclassConstraints.html | 33 ++++++ html-test/tests/SpuriousSuperclassConstraints.hs | 30 +++++ 3 files changed, 191 insertions(+) create mode 100644 html-test/ref/SpuriousSuperclassConstraints.html create mode 100644 html-test/ref/mini_SpuriousSuperclassConstraints.html create mode 100644 html-test/tests/SpuriousSuperclassConstraints.hs (limited to 'html-test') diff --git a/html-test/ref/SpuriousSuperclassConstraints.html b/html-test/ref/SpuriousSuperclassConstraints.html new file mode 100644 index 00000000..26b30d24 --- /dev/null +++ b/html-test/ref/SpuriousSuperclassConstraints.html @@ -0,0 +1,128 @@ + +SpuriousSuperclassConstraints

 

Safe HaskellNone

SpuriousSuperclassConstraints

Description

What is tested here: +

Due to a change in GHC 7.6.1 we had a bug that superclass contraints were + included in the instances list. Edward K. repported it here: +

http://www.haskell.org/pipermail/haskell-cafe/2012-September/103600.html +

And here is the corresponding theard on glasgow-haskell-users: +

http://www.haskell.org/pipermail/glasgow-haskell-users/2012-September/022914.html +

It has been fixed in: +

 6ccf78e15a525282fef61bc4f58a279aa9c21771
+ Fix spurious superclass constraints bug.
+

Documentation

data SomeType f a

diff --git a/html-test/ref/mini_SpuriousSuperclassConstraints.html b/html-test/ref/mini_SpuriousSuperclassConstraints.html new file mode 100644 index 00000000..22079a4e --- /dev/null +++ b/html-test/ref/mini_SpuriousSuperclassConstraints.html @@ -0,0 +1,33 @@ + +SpuriousSuperclassConstraints

SpuriousSuperclassConstraints

data SomeType f a

diff --git a/html-test/tests/SpuriousSuperclassConstraints.hs b/html-test/tests/SpuriousSuperclassConstraints.hs new file mode 100644 index 00000000..d9e43e1c --- /dev/null +++ b/html-test/tests/SpuriousSuperclassConstraints.hs @@ -0,0 +1,30 @@ +{-# LANGUAGE EmptyDataDecls, KindSignatures #-} +-- | +-- What is tested here: +-- +-- Due to a change in GHC 7.6.1 we had a bug that superclass contraints were +-- included in the instances list. Edward K. repported it here: +-- +-- +-- +-- And here is the corresponding theard on glasgow-haskell-users: +-- +-- +-- +-- It has been fixed in: +-- +-- > 6ccf78e15a525282fef61bc4f58a279aa9c21771 +-- > Fix spurious superclass constraints bug. +-- +module SpuriousSuperclassConstraints where + +import Control.Applicative + +data SomeType (f :: * -> *) a + +instance Functor (SomeType f) where + fmap = undefined + +instance Applicative f => Applicative (SomeType f) where + pure = undefined + (<*>) = undefined -- cgit v1.2.3