diff options
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 |