summaryrefslogtreecommitdiff
path: root/assignment-13/Util.dcl
diff options
context:
space:
mode:
authorCamil Staps2018-01-02 22:28:13 +0100
committerCamil Staps2018-01-02 22:28:13 +0100
commit82b4d838ee16fea80bfc0da630603273f7cba6c2 (patch)
tree1762a3ae13ae7b9758325606e301176ee1c61a67 /assignment-13/Util.dcl
parentRemove value from cashModel; add further explanation to gastje (diff)
Start with assignment 13
Diffstat (limited to 'assignment-13/Util.dcl')
-rw-r--r--assignment-13/Util.dcl19
1 files changed, 19 insertions, 0 deletions
diff --git a/assignment-13/Util.dcl b/assignment-13/Util.dcl
new file mode 100644
index 0000000..11ad93e
--- /dev/null
+++ b/assignment-13/Util.dcl
@@ -0,0 +1,19 @@
+definition module Util
+
+:: PrState =
+ { indent :: Int
+ , output :: [String]
+ }
+
+class print a :: a -> PrState -> PrState
+
+printToString :: a -> String | print a
+
+instance print String
+instance print Int
+
+nl :: PrState -> PrState
+indent :: PrState -> PrState
+unindent :: PrState -> PrState
+
+prsperse :: a [b] -> PrState -> PrState | print a & print b