Skip to content

Commit 811bbc4

Browse files
authored
Narrow down unnecessarily imprecise type (#145)
1 parent d581caf commit 811bbc4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ New features:
1111
Bugfixes:
1212

1313
Other improvements:
14+
- Narrow down unnecessarily imprecise type of `mapWithIndexArray` (#145)
1415

1516
## [v5.0.1](https://github.com/purescript/purescript-foldable-traversable/releases/tag/v5.0.1) - 2021-04-20
1617

src/Data/FunctorWithIndex.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import Data.Tuple (Tuple, curry)
3535
class Functor f <= FunctorWithIndex i f | f -> i where
3636
mapWithIndex :: forall a b. (i -> a -> b) -> f a -> f b
3737

38-
foreign import mapWithIndexArray :: forall i a b. (i -> a -> b) -> Array a -> Array b
38+
foreign import mapWithIndexArray :: forall a b. (Int -> a -> b) -> Array a -> Array b
3939

4040
instance functorWithIndexArray :: FunctorWithIndex Int Array where
4141
mapWithIndex = mapWithIndexArray

0 commit comments

Comments
 (0)