summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T8912.hs
blob: 5ffb47ebde36f31aa19e19866bb1593ac9ee6a26 (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE ImplicitParams #-}
module T8912 where

class C a where
  toInt :: a -> Int

instance (?imp :: Int) => C [a] where
  toInt _ = ?imp

test :: Int
test = let ?imp = 5 in toInt "Hello, world"