testsuite: Add regression test for #13474
[ghc.git] / testsuite / tests / typecheck / should_compile / T13474.hs
1 module T13474 where
2
3 import qualified Data.Map as M
4
5 class Default a where
6 def :: a
7
8 foo :: Default a => b -> a
9 foo x = def
10
11 mapdef :: Default v => M.Map k v -> M.Map k v
12 mapdef = M.map foo
13