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
Tobias Decking
GHC
Commits
27e2c4bb
Commit
27e2c4bb
authored
Mar 30, 2008
by
Ian Lynagh
Browse files
Add a test for trac #2158
parent
abb9e342
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/array/should_run/all.T
View file @
27e2c4bb
...
...
@@ -22,3 +22,4 @@ test('arr015', skip_if_fast, compile_and_run, [''])
test
('
arr016
',
normal
,
compile_and_run
,
['
-fglasgow-exts
'])
test
('
arr017
',
skip_if_fast
,
compile_and_run
,
[''])
test
('
arr018
',
skip_if_fast
,
compile_and_run
,
[''])
test
('
arr019
',
normal
,
compile_and_run
,
[''])
testsuite/tests/ghc-regress/array/should_run/arr019.hs
0 → 100644
View file @
27e2c4bb
-- Test for trac #2158
import
Data.Array
data
Pos
=
Pos
Integer
Integer
deriving
(
Show
,
Eq
,
Ord
,
Ix
)
myBounds
::
(
Pos
,
Pos
)
myBounds
=
(
Pos
0
0
,
Pos
2
3
)
main
::
IO
()
main
=
do
print
$
range
myBounds
print
$
index
myBounds
(
Pos
0
0
)
print
$
index
myBounds
(
Pos
0
1
)
print
$
index
myBounds
(
Pos
0
2
)
print
$
index
myBounds
(
Pos
0
3
)
print
$
index
myBounds
(
Pos
1
0
)
print
$
index
myBounds
(
Pos
1
1
)
print
$
index
myBounds
(
Pos
1
2
)
print
$
index
myBounds
(
Pos
1
3
)
print
$
index
myBounds
(
Pos
2
0
)
print
$
index
myBounds
(
Pos
2
1
)
print
$
index
myBounds
(
Pos
2
2
)
print
$
index
myBounds
(
Pos
2
3
)
print
$
listArray
myBounds
[(
123
::
Integer
)
..
]
testsuite/tests/ghc-regress/array/should_run/arr019.stdout
0 → 100644
View file @
27e2c4bb
[Pos 0 0,Pos 0 1,Pos 0 2,Pos 0 3,Pos 1 0,Pos 1 1,Pos 1 2,Pos 1 3,Pos 2 0,Pos 2 1,Pos 2 2,Pos 2 3]
0
1
2
3
4
5
6
7
8
9
10
11
array (Pos 0 0,Pos 2 3) [(Pos 0 0,123),(Pos 0 1,124),(Pos 0 2,125),(Pos 0 3,126),(Pos 1 0,127),(Pos 1 1,128),(Pos 1 2,129),(Pos 1 3,130),(Pos 2 0,131),(Pos 2 1,132),(Pos 2 2,133),(Pos 2 3,134)]
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