Ran a Language server on my old code

This commit is contained in:
vegowotenks 2025-07-04 10:06:45 +02:00
parent 64967afb9b
commit 38ed3f1be8
4 changed files with 51 additions and 28 deletions

View file

@ -34,6 +34,7 @@ main = ioLoop initVars
precision = 5 :: Int
showRatio :: Int -> Rational -> String
showRatio _ 0 = "0"
showRatio p r = (if (r < 0) then "-" else "") ++ prepoint_digits ++ (if (length postpoint_digits > 0) then ("." ++ postpoint_digits) else "")
where
prepoint_digits = init . show . round . abs $ (r * 10)