summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc136.hs
blob: 044f0a75f737a8bbfb72c22f13337a9a82d3e560 (plain)
1
2
3
4
5
6
7
8
9
10
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