Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
27e2c4bb
Commit
27e2c4bb
authored
Mar 30, 2008
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for trac #2158
parent
abb9e342
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
0 deletions
+42
-0
testsuite/tests/ghc-regress/array/should_run/all.T
testsuite/tests/ghc-regress/array/should_run/all.T
+1
-0
testsuite/tests/ghc-regress/array/should_run/arr019.hs
testsuite/tests/ghc-regress/array/should_run/arr019.hs
+27
-0
testsuite/tests/ghc-regress/array/should_run/arr019.stdout
testsuite/tests/ghc-regress/array/should_run/arr019.stdout
+14
-0
No files found.
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