1 2 3 4 5 6 7 8 9 10
module Main where main :: IO () main = do let x = -1e3 :: Rational print $ case x of 1e3 -> "1" -1e3 -> "-1" _ -> "other"