Commit 674f39db authored by simonpj's avatar simonpj
Browse files

Test Trac #3323

parent 66660a59
-- Trac #3323
module T3323 where
import GHC.IO.Handle.Types
import GHC.IO.Handle.Internals
-- The point here is that Handle__ is an existential type,
-- so the haDevice field can't be updated.
-- The bug was that, haDevice is a "naughty" selector, we
-- couldn't find its type constructor.
-- This only happened when you go via an interface file, which is why
-- this test imports an existential. To make the test more
-- standalone, you'd need to make it a two-module test
f :: Handle__ -> Handle__
f h = h {haDevice=undefined}
Record update for insufficiently polymorphic field: haDevice :: dev
In the expression: h {haDevice = undefined}
In the definition of `f': f h = h {haDevice = undefined}
......@@ -213,4 +213,5 @@ test('T3155', normal, compile_fail, [''])
test('T3176', normal, compile_fail, [''])
test('T1633', normal, compile_fail, [''])
test('T2806', normal, compile_fail, [''])
test('T3323', normal, compile_fail, [''])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment