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

-- !!! Existentials

-- This one killed GHC 5.00.1:
--    Inferred type is less polymorphic than expected
--    Quantified type variable `a' is unified with another quantified type variable `a'
--    When checking a pattern that binds f :: a -> Int
--    In the definition of `f': f (T (x :: a) f) = T (undefined :: a) f

module Test where

data T = forall a. T a (a->Int)

f :: T -> T
f (T (x::a) f) = T (undefined::a) f