From d744fa7ae5e638c1ca16f400a49633a705208ce4 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sun, 18 Feb 2024 21:55:46 +0100 Subject: WIP big parser refactor with better typing --- src/Pretty.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/Pretty.hs (limited to 'src/Pretty.hs') diff --git a/src/Pretty.hs b/src/Pretty.hs new file mode 100644 index 0000000..ef7c39a --- /dev/null +++ b/src/Pretty.hs @@ -0,0 +1,11 @@ +module Pretty where + + +class Pretty a where + prettysPrec :: Int -> a -> ShowS + +prettyPrec :: Pretty a => Int -> a -> String +prettyPrec d x = prettysPrec d x "" + +pretty :: Pretty a => a -> String +pretty x = prettyPrec 0 x -- cgit v1.2.3-70-g09d2