Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
87a0a37d
Commit
87a0a37d
authored
26 years ago
by
Simon Marlow
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1999-01-18 15:44:44 by simonm]
Update
parent
3877b99d
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ghc/tests/lib/should_run/Makefile
+2
-2
2 additions, 2 deletions
ghc/tests/lib/should_run/Makefile
ghc/tests/lib/should_run/list001.hs
+13
-13
13 additions, 13 deletions
ghc/tests/lib/should_run/list001.hs
with
15 additions
and
15 deletions
ghc/tests/lib/should_run/Makefile
+
2
−
2
View file @
87a0a37d
#-----------------------------------------------------------------------------
# $Id: Makefile,v 1.
8
199
8/11/25
1
6
:44:
05
simonm Exp $
# $Id: Makefile,v 1.
9
199
9/01/18
1
5
:44:
44
simonm Exp $
TOP
=
../..
include
$(TOP)/mk/boilerplate.mk
...
...
@@ -8,7 +8,7 @@ include $(TOP)/mk/should_run.mk
SRC_HC_OPTS
+=
-dcore-lint
packedstring001_HC_OPTS
=
-syslib
misc
exceptions001_HC_OPTS
=
-fglasgow-exts
exceptions001_HC_OPTS
=
-fglasgow-exts
-fno-warn-missing-methods
stableptr002_HC_OPTS
=
-fglasgow-exts
list001_HC_OPTS
=
-fglasgow-exts
...
...
This diff is collapsed.
Click to expand it.
ghc/tests/lib/should_run/list001.hs
+
13
−
13
View file @
87a0a37d
...
...
@@ -13,19 +13,19 @@ main = do
-- head
print
(
head
[
1
,
2
,
3
,
4
],
head
"a"
)
catch
(
print
(
head
[]
::
String
))
(
\
_
->
putStr
"head []
\n
"
)
catch
AllIO
(
print
(
head
[]
::
String
))
(
\
_
->
putStr
"head []
\n
"
)
-- tail
print
(
tail
[
1
,
2
,
3
,
4
],
tail
"a"
)
catch
(
print
(
tail
[]
::
String
))
(
\
_
->
putStr
"tail []
\n
"
)
catch
AllIO
(
print
(
tail
[]
::
String
))
(
\
_
->
putStr
"tail []
\n
"
)
-- init
print
(
init
[
1
,
2
,
3
,
4
],
init
"a"
)
catch
(
print
(
init
[]
::
String
))
(
\
_
->
putStr
"init []
\n
"
)
catch
AllIO
(
print
(
init
[]
::
String
))
(
\
_
->
putStr
"init []
\n
"
)
-- last
print
(
last
[
1
,
2
,
3
,
4
],
last
"a"
)
catch
(
print
(
last
[]
::
String
))
(
\
_
->
putStr
"last []
\n
"
)
catch
AllIO
(
print
(
last
[]
::
String
))
(
\
_
->
putStr
"last []
\n
"
)
-- null
print
[
null
[]
,
null
"abc"
]
...
...
@@ -38,43 +38,43 @@ main = do
-- foldl1
print
(
foldl1
(
+
)
[
1
..
10
])
catch
(
print
(
foldl1
(
+
)
[]
::
Int
))
(
\
_
->
putStr
"foldl1 []
\n
"
)
catch
AllIO
(
print
(
foldl1
(
+
)
[]
::
Int
))
(
\
_
->
putStr
"foldl1 []
\n
"
)
-- scanl
print
(
scanl
(
+
)
1
[
1
..
10
])
-- scanl1
print
(
scanl1
(
+
)
[
1
..
10
])
catch
(
print
(
scanl1
(
+
)
[]
::
[
Int
]))
(
\
_
->
putStr
"scanl1 []
\n
"
)
catch
AllIO
(
print
(
scanl1
(
+
)
[]
::
[
Int
]))
(
\
_
->
putStr
"scanl1 []
\n
"
)
-- foldr1
print
(
foldr1
(
+
)
[
1
..
10
])
catch
(
print
(
foldr1
(
+
)
[]
::
Int
))
(
\
_
->
putStr
"foldr1 []
\n
"
)
catch
AllIO
(
print
(
foldr1
(
+
)
[]
::
Int
))
(
\
_
->
putStr
"foldr1 []
\n
"
)
-- scanr
print
(
scanr
(
+
)
1
[
1
..
10
])
-- scanr1
print
(
scanr1
(
+
)
[
1
..
10
])
catch
(
print
(
scanr1
(
+
)
[]
::
[
Int
]))
(
\
_
->
putStr
"scanr1 []
\n
"
)
catch
AllIO
(
print
(
scanr1
(
+
)
[]
::
[
Int
]))
(
\
_
->
putStr
"scanr1 []
\n
"
)
-- iterate
print
(
take
10
(
cycle
(
take
4
(
iterate
(
+
1
)
1
))))
-- take
print
(
take
4
(
repeat
"x"
),
take
0
(
repeat
"x"
),
take
5
[
1
..
4
])
catch
(
print
(
take
(
-
1
)
[
1
..
10
]))
(
\
_
->
putStr
"take (-1)
\n
"
)
catch
AllIO
(
print
(
take
(
-
1
)
[
1
..
10
]))
(
\
_
->
putStr
"take (-1)
\n
"
)
-- replicate
print
[
replicate
2
"abc"
,
replicate
0
"abc"
,
replicate
3
[]
]
-- drop
print
[
drop
5
[
1
..
10
],
drop
0
[
1
..
10
],
drop
5
[
1
..
4
]]
catch
(
print
(
drop
(
-
1
)
[
1
..
10
]))
(
\
_
->
putStr
"drop (-1)
\n
"
)
catch
AllIO
(
print
(
drop
(
-
1
)
[
1
..
10
]))
(
\
_
->
putStr
"drop (-1)
\n
"
)
-- splitAt
print
[
splitAt
5
[
1
..
10
],
splitAt
5
[
1
..
4
]]
catch
(
print
(
splitAt
(
-
1
)
[
1
..
10
]))
(
\
_
->
putStr
"splitAt (-1)
\n
"
)
catch
AllIO
(
print
(
splitAt
(
-
1
)
[
1
..
10
]))
(
\
_
->
putStr
"splitAt (-1)
\n
"
)
-- scan
print
(
span
(
<
5
)
[
1
..
10
])
...
...
@@ -108,11 +108,11 @@ main = do
-- maximum
print
(
maximum
[
1
..
10
])
catch
(
print
(
maximum
[]
::
Int
))
(
\
_
->
putStr
"maximum []
\n
"
)
catch
AllIO
(
print
(
maximum
[]
::
Int
))
(
\
_
->
putStr
"maximum []
\n
"
)
-- minimum
print
(
minimum
[
1
..
10
])
catch
(
print
(
minimum
[]
::
Int
))
(
\
_
->
putStr
"minimum []
\n
"
)
catch
AllIO
(
print
(
minimum
[]
::
Int
))
(
\
_
->
putStr
"minimum []
\n
"
)
-- concatMap
print
(
concatMap
(
:
[]
)
[(
1
::
Int
)
..
10
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment