summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc141.hs
blob: f1b8d29b29320266ba430d1293fef7418d251443 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE ScopedTypeVariables #-}

-- Scoped type variables on pattern bindings
-- This should *fail* on GHC 5.02 and lower,
-- It's a post-5.02 enhancements to allow them.

-- It's an error again in GHC 6.6!

module ShouldCompile where

f x = let (p::a,q::a) = x in (q::a,p)

g a b = let y::a = a in
        let  v :: a
             v = b
         in v