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
42b56be9
Commit
42b56be9
authored
Sep 07, 2001
by
simonmar
Browse files
[project @ 2001-09-07 08:17:07 by simonmar]
Fix some signatures after the change to the Ix class.
parent
83fe3380
Changes
1
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/programs/andy_cherry/GenUtils.hs
View file @
42b56be9
...
...
@@ -199,7 +199,7 @@ mapAccumL f s (b:bs) = (c:cs,s'')
-- Here is a version of @elem@ that uses partual application
-- to optimise lookup.
arrElem
::
(
Ix
a
)
=>
[
a
]
->
a
->
Bool
arrElem
::
(
Ord
a
,
Ix
a
)
=>
[
a
]
->
a
->
Bool
arrElem
obj
=
\
x
->
inRange
size
x
&&
arr
!
x
where
size
=
(
maximum
obj
,
minimum
obj
)
...
...
@@ -209,7 +209,7 @@ arrElem obj = \x -> inRange size x && arr ! x
-- again using arrays, of course. Remember @b@ can be a function !
-- Note again the use of partiual application.
arrCond
::
(
Ix
a
)
arrCond
::
(
Eq
a
,
Ix
a
)
=>
(
a
,
a
)
-- the bounds
->
[(
Assoc
[
a
]
b
)]
-- the simple lookups
->
[(
Assoc
(
a
->
Bool
)
b
)]
-- the functional lookups
...
...
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