Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
obsidiansystems
GHC
Commits
1dce8845
Commit
1dce8845
authored
Jun 20, 2001
by
sewardj
Browse files
[project @ 2001-06-20 15:11:17 by sewardj]
All your codeGen tests are belong to me. Well, the should_run ones, at least.
parent
23f574d4
Changes
99
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/codeGen/should_run/all.T
0 → 100644
View file @
1dce8845
include
(
$confdir
++
"
/../vanilla-test.T
")
--
Args
to
vt
are:
extra
compile
flags
--
extra
run
flags
--
expected
process
return
value
,
if
not
zero
test
"
cg001
"
{
vt
("",
"",
"")
}
test
"
cg002
"
{
vt
("",
"",
"")
}
test
"
cg003
"
{
vt
("",
"",
"")
}
test
"
cg004
"
{
vt
("",
"",
"")
}
test
"
cg005
"
{
vt
("",
"",
"")
}
test
"
cg006
"
{
vt
("",
"",
"")
}
test
"
cg007
"
{
vt
("",
"",
"")
}
test
"
cg008
"
{
vt
("",
"",
"")
}
test
"
cg009
"
{
vt
("",
"",
"")
}
test
"
cg010
"
{
vt
("",
"",
"")
}
test
"
cg011
"
{
vt
("",
"",
"")
}
test
"
cg012
"
{
vt
("
-fglasgow-exts
",
"",
"")
}
test
"
cg013
"
{
vt
("",
"",
"")
}
test
"
cg014
"
{
vt
("",
"",
"")
}
test
"
cg015
"
{
vt
("
-fglasgow-exts
",
"",
"")
}
test
"
cg016
"
{
vt
("",
"",
"
1
")
}
test
"
cg017
"
{
vt
("",
"",
"")
}
test
"
cg018
"
{
vt
("
-fglasgow-exts
",
"",
"")
}
test
"
cg019
"
{
vt
("",
"",
"")
}
test
"
cg020
"
{
vt
("",
"",
"")
}
test
"
cg021
"
{
vt
("",
"",
"")
}
test
"
cg022
"
{
vt
("",
"",
"")
}
test
"
cg023
"
{
vt
("",
"",
"")
}
test
"
cg024
"
{
vt
("",
"",
"")
}
test
"
cg025
"
{
vt
("
-package lang -package text
",
"",
"
1
")
}
test
"
cg026
"
{
vt
("
-package lang -fglasgow-exts -fvia-C
",
"",
"")
}
test
"
cg027
"
{
vt
("",
"",
"")
}
test
"
cg028
"
{
vt
("",
"",
"")
}
test
"
cg029
"
{
vt
("
-package lang -fglasgow-exts
",
"",
"")
}
test
"
cg030
"
{
vt
("
-package lang -fglasgow-exts
",
"",
"")
}
test
"
cg031
"
{
vt
("
-fglasgow-exts
",
"",
"")
}
test
"
cg032
"
{
vt
("
-fglasgow-exts
",
"",
"")
}
test
"
cg033
"
{
vt
("
-fglasgow-exts
",
"",
"")
}
test
"
cg034
"
{
vt
("",
"",
"")
}
test
"
cg035
"
{
vt
("
-package lang -fglasgow-exts
",
"",
"")
}
test
"
cg036
"
{
vt
("",
"",
"")
}
test
"
cg037
"
{
vt
("",
"",
"")
}
test
"
cg038
"
{
vt
("",
"",
"")
}
test
"
cg039
"
{
vt
("",
"",
"")
}
test
"
cg040
"
{
vt
("",
"",
"")
}
test
"
cg041
"
{
vt
("",
"",
"")
}
test
"
cg042
"
{
vt
("
-package lang -fglasgow-exts
",
"",
"")
}
test
"
cg043
"
{
vt
("",
"",
"")
}
test
"
cg044
"
{
vt
("
-package lang
",
"",
""
)
}
--
tmp
,
until
we
fix
the
problems
with
seq
#...
test
"
cg045
"
{
vt
(
"
-O
",
"",
"
1
")
}
test
"
cg046
"
{
vt
("",
"",
"")
}
test
"
cg047
"
{
vt
("",
"",
"")
}
test
"
cg048
"
{
vt
("",
"",
"")
}
test
"
cg049
"
{
vt
(
"
-funbox-strict-fields
",
"",
"")
}
testsuite/tests/ghc-regress/codeGen/should_run/cg001.hs
0 → 100644
View file @
1dce8845
-- !! cg001: main = -42 -- take 1
main
=
print
(
f
()
)
where
f
::
a
->
Int
f
x
=
-
42
testsuite/tests/ghc-regress/codeGen/should_run/cg001.stdout
0 → 100644
View file @
1dce8845
-42
testsuite/tests/ghc-regress/codeGen/should_run/cg002.hs
0 → 100644
View file @
1dce8845
main
=
print
((
f
id2
)
(
10
+
thirty_two
))
where
f
x
=
g
x
where
g
x
=
h
x
where
h
x
=
x
thirty_two
::
Int
thirty_two
=
32
id2
x
=
x
testsuite/tests/ghc-regress/codeGen/should_run/cg002.stdout
0 → 100644
View file @
1dce8845
42
testsuite/tests/ghc-regress/codeGen/should_run/cg003.hs
0 → 100644
View file @
1dce8845
main
=
print
(
id2
(
id2
id2
)
(
42
::
Int
))
-- where
-- id2 = s k k
-- id2 x = s k k x
id2
=
s
k
k
s
x
y
z
=
x
z
(
y
z
)
k
x
y
=
x
testsuite/tests/ghc-regress/codeGen/should_run/cg003.stdout
0 → 100644
View file @
1dce8845
42
testsuite/tests/ghc-regress/codeGen/should_run/cg004.hs
0 → 100644
View file @
1dce8845
main
=
print
(
length
([
9
,
8
,
7
,
6
,
5
,
4
,
3
,
2
,
1
]
::
[
Int
]))
testsuite/tests/ghc-regress/codeGen/should_run/cg004.stdout
0 → 100644
View file @
1dce8845
9
testsuite/tests/ghc-regress/codeGen/should_run/cg005.hs
0 → 100644
View file @
1dce8845
-- !! answer: 65532
main
=
print
foo
foo
::
Int
foo
=
((
1
+
2
+
32767
-
4
)
*
6
)
--later? `div` 3
testsuite/tests/ghc-regress/codeGen/should_run/cg005.stdout
0 → 100644
View file @
1dce8845
196596
testsuite/tests/ghc-regress/codeGen/should_run/cg006.hs
0 → 100644
View file @
1dce8845
main
=
print
(
length
thirteen_ones
)
where
thirteen_ones
=
take
(
13
::
Int
)
ones
ones
::
[
Int
]
ones
=
1
:
ones
testsuite/tests/ghc-regress/codeGen/should_run/cg006.stdout
0 → 100644
View file @
1dce8845
13
testsuite/tests/ghc-regress/codeGen/should_run/cg007.hs
0 → 100644
View file @
1dce8845
data
Tree
a
=
Leaf
a
|
Branch
(
Tree
a
)
(
Tree
a
)
main
=
print
(
height
our_tree
)
where
our_tree
::
Tree
Int
our_tree
=
Branch
(
Branch
(
Leaf
1
)
(
Branch
(
Branch
(
Leaf
1
)
(
Leaf
1
))
(
Leaf
1
)))
(
Branch
(
Leaf
1
)
(
Leaf
1
))
height
::
Tree
a
->
Int
height
(
Leaf
_
)
=
1
height
(
Branch
t1
t2
)
=
1
+
max
(
height
t1
)
(
height
t2
)
testsuite/tests/ghc-regress/codeGen/should_run/cg007.stdout
0 → 100644
View file @
1dce8845
5
testsuite/tests/ghc-regress/codeGen/should_run/cg008.hs
0 → 100644
View file @
1dce8845
main
=
print
(
length
comp_list
)
where
comp_list
::
[(
Int
,
Int
)]
comp_list
=
[
(
elem1
,
elem2
)
|
elem1
<-
given_list
,
elem2
<-
given_list
,
elem1
>=
(
4
::
Int
),
elem2
<
(
3
::
Int
)
]
given_list
::
[
Int
]
given_list
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
]
testsuite/tests/ghc-regress/codeGen/should_run/cg008.stdout
0 → 100644
View file @
1dce8845
12
testsuite/tests/ghc-regress/codeGen/should_run/cg009.hs
0 → 100644
View file @
1dce8845
main
=
print
(
length
take_list
)
where
take_list
::
[
Int
]
take_list
=
takeWhile
(
\
x
->
x
<
6
)
given_list
given_list
::
[
Int
]
given_list
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
]
testsuite/tests/ghc-regress/codeGen/should_run/cg009.stdout
0 → 100644
View file @
1dce8845
5
testsuite/tests/ghc-regress/codeGen/should_run/cg010.hs
0 → 100644
View file @
1dce8845
main
=
print
a
where
a
::
Int
b
::
Int
(
a
,
b
)
=
(
3
+
4
,
5
+
6
)
Prev
1
2
3
4
5
Next
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