aboutsummaryrefslogblamecommitdiff
path: root/html-test/src/ImplicitParams.hs
blob: 3ca9157b0a12619789164995fdc61b9dbe77b975 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                           
                           
          




                                 

                          
{-# LANGUAGE ImplicitParams, RankNTypes #-}
module ImplicitParams where

data X = X

c :: (?x :: X) => X
c = ?x

d :: (?x :: X, ?y :: X) => (X, X)
d = (?x, ?y)

f :: ((?x :: X) => a) -> a
f a = let ?x = X in a