-- Vordefinierte show-Funktion auf Basis von showsPrec show :: a -> String show x = showsPrec 0 x [] -- Implementation von showsPrec für ArbInt showsPrec :: Int -> a -> String -> String instance Show ArbInt where showsPrec k x | isZero x = showChar '0' | negative x = showChar '-' . showDigits (digits (negate x)) | otherwise = showDigits (digits x) -- Test auf negative Zahl negative :: ArbInt -> Bool negative (Norm xs) = not (null xs) && (head xs < 0)