Elf: Fix link info note generation
[ghc.git] / testsuite / tests / typecheck / should_fail / T5978.hs
1 {-# LANGUAGE MultiParamTypeClasses #-}
2 {-# LANGUAGE FunctionalDependencies #-}
3 module T5978 where
4
5 class C from to | from -> to where
6
7 instance C Float Char where
8 instance C Double Bool where
9
10
11 polyFoo :: (C from to) => from
12 polyFoo = undefined
13
14 polyBar ::
15 (C fromA toA, C fromB toB) =>
16 (toA -> toB) ->
17 fromA -> fromB
18 polyBar = undefined
19
20
21 monoBar :: Double
22 monoBar = polyBar id monoFoo
23 -- fromA = Float, fromB = Double, toA = toB
24 -- [W] C Float to, C Double to
25 -- => [D] to ~ Char, [D] to ~ Bool
26
27 monoFoo :: Float
28 monoFoo = polyFoo
29