module Export.Generic where import Text.PrettyPrint isIntegral :: Double -> Bool isIntegral x = x == fromInteger (round x) pointsDoc :: Double -> Doc pointsDoc v | isNaN v = empty pointsDoc v | isIntegral v = integer (round v) pointsDoc v = double v