summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc144.hs
blob: bb55310415e4f2e25fe173fea5cb2c72cde7ca48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE ImplicitParams, RankNTypes #-}

-- Rank-2 types with implicit parameters.
-- GHC 5.02 erroneously rejected this

module ShouldCompile where

    f :: ((?param :: a) => b) -> a -> b
    f foo a = let ?param = a in foo 

    g :: (?param :: a) => a
    g = ?param

    h :: a -> a
    h = f g