summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_run/tcrun023.hs
blob: 3a6166b015dfef78701a37281132dd28fcc9aed2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{-# LANGUAGE ImplicitParams #-}

-- Implicit parameters should not give rise to ambiguity.

module Main (main) where

foo :: (?x :: [a]) => Int -> String
foo n = show (n + length ?x)


main = do { putStrLn (let ?x = [True,False] in foo 3) ;
	    putStrLn (let ?x = "fred"       in foo 4) }