File tree Expand file tree Collapse file tree 5 files changed +22
-47
lines changed Expand file tree Collapse file tree 5 files changed +22
-47
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,8 @@ build:
1313 $(COMPILER) ./HashMap.trp -l
1414 $(COMPILER) ./HashSet.trp -l
1515 # Old stuff, here be dragons...
16- $(COMPILER) ./printService.trp -l
1716 $(COMPILER) ./timeout.trp -l
1817 $(COMPILER) ./declassifyutil.trp -l
19- $(COMPILER) ./stdio.trp -l
2018
2119clean :
2220 rm -rf out
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- import stdio
21let val out = getStdout authority
2+
3+ fun inputLineWithPini auth =
4+ let pini auth val s = inputLine ()
5+ in s
6+ end
7+
8+ fun inputLineAtLevel auth lev =
9+ let val s = inputLineWithPini auth
10+ in declassify (s, auth, lev)
11+ end
12+
313 fun writeString x = fwrite (out, x)
14+
415 val _ = writeString "Please input something: "
516 val s = inputLineAtLevel authority `{}`
617 val _ = writeString ("You have provided input: " ^ s ^ "\n")
7- in s
8- end
18+
19+ in s end
Original file line number Diff line number Diff line change 1- import stdio
1+ let fun inputLineWithPini auth =
2+ let pini auth val s = inputLine ()
3+ in s
4+ end
25
6+ val out = getStdout authority
7+ val _ = fwrite (out, "What's your name: ")
8+ val input = inputLineWithPini authority
39
4- let val _ = fwrite (getStdout authority, "What's your name: ")
5- val input = inputLineWithPini authority
6- in printString ("Hello" ^ " " ^ input )
10+ in fwrite (out, "Hello" ^ " " ^ input ^ "\n")
711end
You can’t perform that action at this time.
0 commit comments