File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ Non-backwards compatible changes
1515Minor improvements
1616------------------
1717
18+ * The types of ` Data.Vec.Base.{truncate|padRight} ` have been weakened so
19+ that the argument of type ` m ≤ n ` is marked as irrelevant. This should be
20+ backwards compatible, but does change the equational behaviour of these
21+ functions to be more eager, because no longer blocking on pattern matching
22+ on that argument.
23+
1824Deprecated modules
1925------------------
2026
Original file line number Diff line number Diff line change @@ -289,14 +289,14 @@ uncons (x ∷ xs) = x , xs
289289-- Operations involving ≤
290290
291291-- Take the first 'm' elements of a vector.
292- truncate : ∀ {m n} → m ≤ n → Vec A n → Vec A m
293- truncate {m = zero} _ _ = []
294- truncate (s≤s le) (x ∷ xs) = x ∷ (truncate le xs)
292+ truncate : .(m ≤ n) → Vec A n → Vec A m
293+ truncate {m = zero} _ _ = []
294+ truncate {m = suc _} le (x ∷ xs) = x ∷ (truncate (s≤s⁻¹ le) xs)
295295
296296-- Pad out a vector with extra elements.
297- padRight : ∀ {m n} → m ≤ n → A → Vec A m → Vec A n
298- padRight z≤n a xs = replicate _ a
299- padRight (s≤s le) a (x ∷ xs) = x ∷ padRight le a xs
297+ padRight : .(m ≤ n) → A → Vec A m → Vec A n
298+ padRight {n = _} _ a [] = replicate _ a
299+ padRight {n = suc _} le a (x ∷ xs) = x ∷ padRight (s≤s⁻¹ le) a xs
300300
301301------------------------------------------------------------------------
302302-- Operations for converting between lists
You can’t perform that action at this time.
0 commit comments