diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc136.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/tc136.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc136.hs b/testsuite/tests/typecheck/should_compile/tc136.hs new file mode 100644 index 0000000000..044f0a75f7 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/tc136.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE ScopedTypeVariables #-} + +-- !!! scoped type variables +-- this test failed in pre-release GHC 5.02 + +module ShouldCompile where + +f :: forall x. x -> x -> x +f (x::x) (y::x) = x +-- Two points: (a) we are using x as a term variable and as a type variable +-- (b) the type variable appears twice, but that is OK |