Commit 76f2fa96 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #5676, and wibble to error message on mod45

parent 03ee7cd1
mod45.hs:5:3: Misplaced type signature: == :: T -> T -> Bool
Illegal type signature in instance declaration:
(==) :: T -> T -> Bool
(Use -XInstanceSigs to allow this)
In the instance declaration for `Eq T'
{-# LANGUAGE ScopedTypeVariables, InstanceSigs #-}
module Foo where
data T a = T a
class C a where
foo :: b -> a -> (a, [b])
instance C a => C (T a) where
foo :: forall b. b -> T a -> (T a, [b])
foo x (T y) = (T y, xs)
xs :: [b]
xs = [x,x,x]
instance Functor T where
fmap :: (a -> b) -> T a -> T b
fmap f (T x) = T (f x)
......@@ -368,4 +368,5 @@ test('T5581', normal, compile, [''])
test('T5655', normal, compile, [''])
test('T5643', normal, compile, [''])
test('T5595', normal, compile, [''])
test('T5676', normal, compile, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment