Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
9e71989b
Commit
9e71989b
authored
Jul 21, 2007
by
Ian Lynagh
Browse files
Add a test for Data.Map, for a bug on the libraries@ list
parent
d6b1060c
Changes
4
Hide whitespace changes
Inline
Side-by-side
libraries/base/tests/Makefile
0 → 100644
View file @
9e71989b
# This Makefile runs the tests using GHC's testsuite framework. It
# assumes the package is part of a GHC build tree with the testsuite
# installed in ../../../testsuite.
TOP
=
../../../testsuite
include
$(TOP)/mk/boilerplate.mk
include
$(TOP)/mk/test.mk
libraries/base/tests/all.T
0 → 100644
View file @
9e71989b
# This is a test script for use with GHC's testsuite framework, see
# http://darcs.haskell.org/testsuite
test
('
datamap001
',
normal
,
compile_and_run
,
[''])
libraries/base/tests/datamap001.hs
0 → 100644
View file @
9e71989b
{-
In the 6.6 era this printed [(5,"x")]; should be [(3,"b"),(5,"a")]
-}
module
Main
(
main
)
where
import
Data.Map
main
::
IO
()
main
=
do
let
m
=
fromList
[(
3
,
"b"
),(
5
,
"a"
)]
f
k
a
=
Just
"x"
m'
=
updateAt
f
1
m
print
m'
libraries/base/tests/datamap001.stdout
0 → 100644
View file @
9e71989b
fromList [(3,"b"),(5,"x")]
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment