From 9f95fa78463d7e6b047485bdce28f1a970a45fd2 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 17 Jul 2017 21:48:37 +0000 Subject: Initial commit --- Sil/Util.dcl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Sil/Util.dcl (limited to 'Sil/Util.dcl') 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 -- cgit v1.2.3