Improve error messages around kind mismatches.
[ghc.git] / testsuite / tests / typecheck / should_fail / T3323.hs
1 -- Trac #3323
2 module T3323 where
3
4 import GHC.IO.Handle.Types
5 import GHC.IO.Handle.Internals
6
7 -- The point here is that Handle__ is an existential type,
8 -- so the haDevice field can't be updated.
9 --
10 -- The bug was that, haDevice is a "naughty" selector, we
11 -- couldn't find its type constructor.
12 --
13 -- This only happened when you go via an interface file, which is why
14 -- this test imports an existential. To make the test more
15 -- standalone, you'd need to make it a two-module test
16
17 f :: Handle__ -> Handle__
18 f h = h {haDevice=undefined}