Ran a Language server on my old code
This commit is contained in:
parent
64967afb9b
commit
38ed3f1be8
4 changed files with 51 additions and 28 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue