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
Glasgow Haskell Compiler
nofib
Commits
a79e782b
Commit
a79e782b
authored
May 18, 1997
by
sof
Browse files
[project @ 1997-05-18 01:49:22 by sof]
New test
parent
c21106a2
Changes
6
Hide whitespace changes
Inline
Side-by-side
GHC_ONLY/bugs/record_upd/Main.hs
0 → 100644
View file @
a79e782b
{- The purpose of this is to test that record update is
sufficiently polymorphic. See comments with
tcExpr (RecordUpd) in TcExpr.lhs
-}
module
Main
where
data
T
a
b
c
d
=
MkT1
{
op1
::
a
,
op2
::
b
}
|
MkT2
{
op1
::
a
,
op3
::
c
}
|
MkT3
{
op4
::
a
,
op5
::
d
}
update1
::
a2
->
T
a
b
c
d
->
T
a2
b
c
d2
update1
x
t
=
t
{
op1
=
x
}
-- NB: the MkT3.op4 case doesn't constrain the result because
-- it doesn't have an op1 field
update2
::
a2
->
T
a
b
c
d
->
T
a2
b2
c2
d
update2
x
t
=
t
{
op4
=
x
}
main
=
print
(
op4
$
update2
True
$
MkT3
{
op4
=
op2
$
update1
(
1
::
Int
)
$
MkT1
{
op1
=
True
}
})
GHC_ONLY/bugs/record_upd/Makefile
0 → 100644
View file @
a79e782b
TOP
=
../../..
include
$(TOP)/mk/boilerplate.mk
include
$(TOP)/mk/target.mk
GHC_ONLY/bugs/record_upd/record_upd.stdout
0 → 100644
View file @
a79e782b
True
GHC_ONLY/bugs/strict_anns/Main.hs
0 → 100644
View file @
a79e782b
-- This test checks that constructors with strictness annotations
-- at least parse correctly. In GHC 2.02 they didn't!
module
Main
where
data
Foo1
=
Crunch1
!
Int
!
Int
Int
deriving
(
Show
)
data
Foo2
=
Crunch2
!
Int
Int
Int
deriving
(
Show
)
main
=
do
print
(
Crunch1
(
1
+
1
)
(
2
+
2
)
(
3
+
3
))
print
(
Crunch2
(
1
+
1
)
(
2
+
2
)
(
3
+
3
))
GHC_ONLY/bugs/strict_anns/Makefile
0 → 100644
View file @
a79e782b
TOP
=
../../..
include
$(TOP)/mk/boilerplate.mk
include
$(TOP)/mk/target.mk
GHC_ONLY/bugs/strict_anns/strict_anns.stdout
0 → 100644
View file @
a79e782b
Crunch1 2 4 6
Crunch2 2 4 6
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