Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
ba63115f
Commit
ba63115f
authored
Jul 12, 2001
by
simonpj
Browse files
[project @ 2001-07-12 16:22:04 by simonpj]
Add tc130
parent
79c24205
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/typecheck/should_compile/all.T
View file @
ba63115f
...
...
@@ -133,3 +133,4 @@ test "tc126" { myvtc("") }
test
"
tc127
"
{
myvtc
("")
}
test
"
tc128
"
{
myvtc
("")
}
test
"
tc129
"
{
myvtc
("")
}
test
"
tc130
"
{
myvtc
("")
}
testsuite/tests/ghc-regress/typecheck/should_compile/tc129.hs
View file @
ba63115f
{-# OPTIONS -fglasgow-exts #-}
-- !!! Test inheritance of implicit parameters.
-- GHC 5.00.2 fails this test
...
...
@@ -11,5 +13,6 @@ data R = R {f :: Int}
foo
::
(
?
x
::
Int
)
=>
R
->
R
foo
r
=
r
{
f
=
?
x
}
baz
::
(
?
x
::
Int
)
=>
Int
baz
=
(
?
x
+
1
)
::
Int
testsuite/tests/ghc-regress/typecheck/should_compile/tc130.hs
0 → 100644
View file @
ba63115f
{-# OPTIONS -fglasgow-exts #-}
-- !!! Desugaring of record updates
-- Showed up a bug in the newtype-squashing machinery
module
ShouldCompile
where
data
R
=
R
{
field
::
Int
}
test
::
(
?
param
::
R
)
=>
a
->
Int
test
x
=
field
(
?
param
{
field
=
42
})
-- The type of the record to be updated is
-- {?param :: R} as well as plain R
-- which confused the compiler
Write
Preview
Supports
Markdown
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