Skip to content
Snippets Groups Projects
Commit 9d6c49b5 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add a test for Data.Map, for a bug on the libraries@ list

parent e8fea177
No related branches found
No related tags found
No related merge requests found
# 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
# This is a test script for use with GHC's testsuite framework, see
# http://darcs.haskell.org/testsuite
test('datamap001', normal, compile_and_run, [''])
{-
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'
fromList [(3,"b"),(5,"x")]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment