diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Main.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Main.hs b/src/Main.hs index 169c900..3576a7a 100644 --- a/src/Main.hs +++ b/src/Main.hs | |||
| @@ -382,7 +382,7 @@ printVal = withArg $ \formula -> withFocus $ \focusId -> do | |||
| 382 | outline Nothing = shellPutErrLn "No such value" | 382 | outline Nothing = shellPutErrLn "No such value" |
| 383 | outline (Just (Map.toList -> [(v, _)])) = shellPutStrLn $ show v | 383 | outline (Just (Map.toList -> [(v, _)])) = shellPutStrLn $ show v |
| 384 | outline (Just (sortBy (comparing snd) . Map.toList -> vals)) = mapM_ (shellPutStrLn . outline') vals | 384 | outline (Just (sortBy (comparing snd) . Map.toList -> vals)) = mapM_ (shellPutStrLn . outline') vals |
| 385 | outline' (v, prob) = pad' 3 (show $ round' prob) ++ " → " ++ show v | 385 | outline' (v, prob) = pad' 3 (show $ round' 10 prob) ++ " → " ++ show v |
| 386 | round' :: RealFrac a => a -> Float | 386 | round' :: RealFrac a => Float -> a -> Float |
| 387 | round' = (/ 10) . fromIntegral . (round :: RealFrac a => a -> Integer) . (* 10) | 387 | round' n = (/ n) . fromIntegral . (round :: RealFrac a => a -> Integer) . (* n) . realToFrac |
| 388 | pad' m ys = replicate (m - length (take m ys)) ' ' ++ ys | 388 | pad' m ys = replicate (m - length (take m ys)) ' ' ++ ys |
