diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-02-18 21:55:46 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-02-18 21:55:46 +0100 |
commit | d744fa7ae5e638c1ca16f400a49633a705208ce4 (patch) | |
tree | f5fe6a6aa6ed8f7ff00a6c4024dc7aa6777a892c /src/Pretty.hs | |
parent | 78ffb5ed5fbda230675310b37f798c500a13ef11 (diff) |
WIP big parser refactor with better typing
Diffstat (limited to 'src/Pretty.hs')
-rw-r--r-- | src/Pretty.hs | 11 |
1 files changed, 11 insertions, 0 deletions
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 |