------------------------------------------------------------------------------
-- The ADP Compiler 
-- Copyright (C) 2001-2007 Peter Steffen, Marco Ruether, Christian Lang,
-- Georg Sauthoff
--
-- Send comments/bug reports to: P.Steffen <psteffen@techfak.uni-bielefeld.de>.
-- Updates: http://www.techfak.uni-bielefeld.de/~psteffen/
------------------------------------------------------------------------------

> module PrettyPrint where


> import Constants

> rev_PrettyPrint =  "$Revision: 718 $"

> class Pretty a where
>   pretty :: a -> String
>   pretty' :: Bool -> a -> String
>   pretty' _ = pretty
>   prettyLang :: Output -> a -> String
>   prettyLang _ x = pretty x
>   prettyOpts :: (PPOpt b) -> a -> String
>   prettyOpts _ x = pretty x


> instance (Pretty a) => Pretty [a] where
>     pretty = concatMap pretty

Options for the prettyOpts-PrettyPrinter

> data PPOpt a = PPOptBool Bool
>              | PPOptInt Int
>              | PPOptString String
>--              | PPOptData a
>              | PPOptList [PPOpt a]


