diff options
Diffstat (limited to 'PrettyPrint.hs')
-rw-r--r-- | PrettyPrint.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/PrettyPrint.hs b/PrettyPrint.hs new file mode 100644 index 0000000..45ca6ac --- /dev/null +++ b/PrettyPrint.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE FlexibleInstances #-} + +module PrettyPrint where + +class PrettyPrint a where + prettyPrint :: a -> String + -- a = a + +instance PrettyPrint String where prettyPrint = id +instance PrettyPrint Double where prettyPrint = show +instance PrettyPrint Int where prettyPrint = show |