Improve error messages around kind mismatches.
[ghc.git] / testsuite / tests / typecheck / should_fail / T7453.hs
1
2 module T7453 where
3
4 newtype Id a = Id { runId :: a }
5
6 -- cast1 :: a -> b
7 cast1 v = runId z
8 where z :: Id t
9 z = aux
10 where aux = Id v
11
12 -- cast2 :: a -> b
13 cast2 v = z ()
14 where z :: () -> t
15 z = aux
16 where aux = const v
17
18 -- cast3 :: a -> b
19 cast3 v = z
20 where z :: t
21 z = v
22 where aux = const v
23
24 cast1' :: a -> b
25 cast1' = cast1
26
27 cast2' :: a -> b
28 cast2' = cast2
29
30 cast3' :: a -> b
31 cast3' = cast3
32