mirror of
https://github.com/idris-lang/Idris2.git
synced 2025-01-07 08:18:12 +03:00
[ minor ] avoid repetition
This commit is contained in:
parent
f8c248dc7a
commit
39f26e7ed6
@ -335,9 +335,10 @@ maxLineLengthForComment = 60
|
||||
|
||||
lJust : (line:String) -> (fillPos:Nat) -> (filler:Char) -> String
|
||||
lJust line fillPos filler =
|
||||
case isLTE (length line) fillPos of
|
||||
let n = length line in
|
||||
case isLTE n fillPos of
|
||||
(Yes prf) =>
|
||||
let missing = minus fillPos (length line)
|
||||
let missing = minus fillPos n
|
||||
fillBlock = pack (replicate missing filler)
|
||||
in
|
||||
line ++ fillBlock
|
||||
|
Loading…
Reference in New Issue
Block a user