diff options
author | Camil Staps | 2017-07-17 21:48:37 +0000 |
---|---|---|
committer | Camil Staps | 2017-07-17 21:48:37 +0000 |
commit | 9f95fa78463d7e6b047485bdce28f1a970a45fd2 (patch) | |
tree | f0daf60bcfec390bf828178d2c75b486447ad708 /Sil/Util.dcl |
Initial commit
Diffstat (limited to 'Sil/Util.dcl')
-rw-r--r-- | Sil/Util.dcl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Sil/Util.dcl b/Sil/Util.dcl new file mode 100644 index 0000000..f3d6803 --- /dev/null +++ b/Sil/Util.dcl @@ -0,0 +1,26 @@ +definition module Sil.Util + +from StdOverloaded import class toString, class zero + +from Sil.Parse import :: Token +from Sil.Syntax import :: Program, :: Function, :: CodeBlock, + :: Initialisation, :: Statement, :: Type, :: Application, :: Literal + +:: PrintState + +instance zero PrintState + +class PrettyPrinter t where + print :: PrintState t -> String + +instance PrettyPrinter [Token] + +instance PrettyPrinter Program +instance PrettyPrinter Function +instance PrettyPrinter CodeBlock +instance PrettyPrinter Initialisation +instance PrettyPrinter Statement + +instance toString Type +instance toString Application +instance toString Literal |