summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail179.hs
blob: a270cbffb2dbc21df541eadeb740b480e2090b59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE ExistentialQuantification #-}

-- Exmaples from Doaitse Swierestra and Brandon Moore
-- GHC users mailing list, April 07, title "Release plans"

-- This one should fail, but Hugs passes it

module ShouldFail where

data T s = forall x. T (s -> (x -> s) -> (x, s, Int))

run :: T s -> Int
run ts  = case ts of
             T g -> let (x,_, b) =  g x id
                    in b