diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2018-04-19 11:45:46 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2018-04-19 11:45:46 +0200 |
commit | af425841a63ee73603cc09510d95a36e646ddafd (patch) | |
tree | 08a1ef8435ec0ab07887256a1c86f908c2389a1a /PrettyPrint.hs | |
parent | 8d9d27d64d9e39ea76fd878e928e553944735e45 (diff) |
Build with stack
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 |