about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-09-12 09:15:59 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-09-12 09:22:41 -0700
commitee72abae2159ad741087e98adeed06b7af1a8a8e (patch)
treecd5b48046fdefae8154c7ebe8b0b321c5a9ead32
parente2b367dc2548ab80fc3e0949ee4f327c1c447758 (diff)
downloadmu-ee72abae2159ad741087e98adeed06b7af1a8a8e.tar.gz
3339
Fix a couple of failing example programs.
-rw-r--r--channel.mu1
-rw-r--r--real-files.mu2
2 files changed, 2 insertions, 1 deletions
diff --git a/channel.mu b/channel.mu
index e7415754..e2e1e758 100644
--- a/channel.mu
+++ b/channel.mu
@@ -16,6 +16,7 @@ def producer sink:address:sink:character -> sink:address:sink:character [
     n <- add n, 1
     loop
   }
+  close sink
 ]
 
 def consumer source:address:source:character -> source:address:source:character [
diff --git a/real-files.mu b/real-files.mu
index d521b774..50137a0b 100644
--- a/real-files.mu
+++ b/real-files.mu
@@ -7,7 +7,7 @@ def main [
   local-scope
   f:number/file <- $open-file-for-reading [/tmp/mu-x]
   $print [file to read from: ], f, 10/newline
-  c:character <- $read-from-file f
+  c:character, eof?:boolean <- $read-from-file f
   $print [copying ], c, 10/newline
   f <- $close-file f
   $print [file after closing: ], f, 10/newline