tcfail174.hs 305 Bytes
Newer Older
simonpj's avatar
simonpj committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# OPTIONS -fglasgow-exts #-}

module Foo where

data Capture a = Base a
               | Capture (Capture (forall x . x -> a))

g :: Capture (forall a . a ->  a)
g = Base id

-- This function should definitely be rejected, with or without type signature

h1 = Capture g

h2 :: Capture b
h2 = Capture g