-- TODO: Use printf instead of string concatenation
-- | Convert a 'MoodleVal' value into a Latex string.
toLatex :: MoodleVal -> String
toLatex (Number n)
    | n >= 0    = formatted
    | otherwise = group formatted
        where formatted = either show show $ floatingOrInteger n
toLatex :: MoodleVal -> String
toLatex (Number n)
    | n >= 0    = formatted
    | otherwise = group formatted
        where formatted = either show show $ floatingOrInteger n
toLatex (Number n)
    | n >= 0    = formatted
    | otherwise = group formatted
        where formatted = either show show $ floatingOrInteger n