blob: 8635b2a4e892f470418194ad6262df5c71e1649d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{-# LANGUAGE Haskell2010 #-}
{-# 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
|