From dd3db844dd49451f28d044cd1d2fd71430d73686 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Thu, 16 Jun 2016 23:24:47 +0200 Subject: Initial --- prettyprint.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 prettyprint.hs (limited to 'prettyprint.hs') 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 -- cgit v1.2.3-54-g00ecf