summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T14273.hs
blob: b813237120e0d10776941312a8fb820c58e61d74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module TypeClassConstraintsInformedHoles where

-- Make sure that constraints imposed by the call site
-- are handled. See trac #14273
pleaseShow :: Show a => Bool -> a -> Maybe String
pleaseShow False _ = Nothing
pleaseShow True a = Just (show _a)

k :: String
k = "I fit into the hole in foo!"

foo :: [a] -> String
foo xs = show (_h ++ [])