summaryrefslogtreecommitdiff
path: root/PrettyPrint.hs
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2018-04-19 11:45:46 +0200
committerTom Smeding <tom.smeding@gmail.com>2018-04-19 11:45:46 +0200
commitaf425841a63ee73603cc09510d95a36e646ddafd (patch)
tree08a1ef8435ec0ab07887256a1c86f908c2389a1a /PrettyPrint.hs
parent8d9d27d64d9e39ea76fd878e928e553944735e45 (diff)
Build with stack
Diffstat (limited to 'PrettyPrint.hs')
-rw-r--r--PrettyPrint.hs11
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