Commit 5903c067 authored by simonpj's avatar simonpj
Browse files

[project @ 2002-09-02 16:30:17 by simonpj]

Add rank-N test
parent f81e5360
......@@ -158,3 +158,4 @@ test('tc157', normal, compile, [''])
test('tc158', normal, compile, [''])
test('tc159', normal, compile, [''])
test('tc160', normal, compile, [''])
test('tc161', normal, compile, [''])
{-# OPTIONS -fglasgow-exts #-}
-- Blew up GHC 5.04, with:
-- Ambiguous type variable(s) `q' in the constraint `Foo q'
-- arising from a function with an overloaded argument type at Foo.hs:7
-- Expected type: Int -> (forall q1. (Foo q1) => q1 -> a) -> a
-- Inferred type: Int -> (q -> a) -> a
-- In the application `GHC.Err.noMethodBindingError "Foo.hs:7|Foo.foo"#'
--
-- Fix is to give wild-card args to the default methods
-- See TcClassDcl.mkDefMethRhs
module ShouldCompile where
class Foo a where
op :: Eq c => c -> (forall b. Eq b => b->b) -> a -> a
instance Foo Int
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