Commit ff9432f6 authored by Matthew Pickering's avatar Matthew Pickering Committed by Ben Gamari

Add test for updating a record with existentially quantified fields.

Test Plan: ./validate

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1193
parent 010e1878
......@@ -469,3 +469,4 @@ test('T10564', normal, compile, [''])
test('T10632', normal, compile, [''])
test('T10642', normal, compile, [''])
test('T10744', normal, compile, [''])
test('update-existential', normal, compile, [''])
{-# LANGUAGE
NoImplicitPrelude
, ExistentialQuantification
#-}
module Test where
hGetContents handle_ = handle_{ haType=SemiClosedHandle}
data HandleType = SemiClosedHandle
class Show a where
show :: a -> a
-- they have to check whether the handle has indeed been closed.
data Handle__
= forall dev . (Show dev) =>
Handle__ {
haDevice :: !dev,
haType :: HandleType -- type (read/write/append etc.)
}
Markdown is supported
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