Skip to content

Commit

Permalink
fix toList-replicate's statement about vectors (#2261)
Browse files Browse the repository at this point in the history
  • Loading branch information
amblafont authored Jan 20, 2024
1 parent 3515c22 commit f59a634
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Highlights
Bug-fixes
---------

* Fix statement of `Data.Vec.Properties.toList-replicate`, where `replicate`
was mistakenly applied to the level of the type `A` instead of the
variable `x` of type `A`.

Non-backwards compatible changes
--------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/Data/Vec/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ zipWith-replicate₂ _⊕_ (x ∷ xs) y =
cong (x ⊕ y ∷_) (zipWith-replicate₂ _⊕_ xs y)

toList-replicate : (n : ℕ) (x : A)
toList (replicate n a) ≡ List.replicate n a
toList (replicate n x) ≡ List.replicate n x
toList-replicate zero x = refl
toList-replicate (suc n) x = cong (_ List.∷_) (toList-replicate n x)

Expand Down

0 comments on commit f59a634

Please sign in to comment.