Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,320
Issues
4,320
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
360
Merge Requests
360
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
5512c723
Commit
5512c723
authored
Oct 28, 2008
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for existential record update (cf Trac
#2595
)
parent
fe5776b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
testsuite/tests/ghc-regress/typecheck/should_compile/all.T
testsuite/tests/ghc-regress/typecheck/should_compile/all.T
+1
-0
testsuite/tests/ghc-regress/typecheck/should_compile/tc244.hs
...suite/tests/ghc-regress/typecheck/should_compile/tc244.hs
+30
-0
No files found.
testsuite/tests/ghc-regress/typecheck/should_compile/all.T
View file @
5512c723
...
...
@@ -258,6 +258,7 @@ test('tc240', normal, compile, [''])
test
('
tc241
',
normal
,
compile
,
[''])
test
('
tc242
',
normal
,
compile
,
[''])
test
('
tc243
',
normal
,
compile
,
[''])
test
('
tc244
',
normal
,
compile
,
[''])
test
('
FD1
',
normal
,
compile_fail
,
[''])
test
('
FD2
',
normal
,
compile_fail
,
[''])
...
...
testsuite/tests/ghc-regress/typecheck/should_compile/tc244.hs
0 → 100644
View file @
5512c723
{-# LANGUAGE TypeFamilies, GADTs #-}
-- Tests record update in the presence of
-- existentials, GADTs, type families
module
Rec
where
----------------- Existential
data
S
a
where
S1
{
fs1
::
a
,
fs2
::
b
}
::
S
a
S2
{
fs1
::
a
}
::
S
a
updS
s
x
=
s
{
fs1
=
x
}
------------------ GADT
data
T
a
b
where
T1
{
ft1
::
a
,
ft2
::
c
,
ft3
::
d
}
::
T
a
Int
T2
{
ft1
::
a
,
ft3
::
c
}
::
T
a
Int
T3
::
T
Int
b
f
::
T
a1
b
->
a2
->
T
a2
b
f
x
v
=
x
{
ft1
=
v
}
------------------ Type family
data
family
R
a
data
instance
R
(
a
,
b
)
where
R1
{
fr1
::
a
,
fr2
::
b
,
fr3
::
c
}
::
R
(
a
,
b
)
R2
{
fr1
::
a
,
fr3
::
c
}
::
R
(
a
,
b
)
updR
r
x
=
r
{
fr1
=
x
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment