Commit 16e1f551 authored by Michael Hanus 's avatar Michael Hanus

Examples updated for PAKCS3

parent 7b2ff37d
......@@ -24,7 +24,7 @@ goal2 b = let s free in
s=:=[Deposit 200, Withdraw 100, Deposit 50, Balance b]
-- send a message:
sendMsg :: msg -> [msg] -> [msg]
sendMsg :: Data msg => msg -> [msg] -> [msg]
sendMsg msg obj | obj =:= msg:obj1 = obj1 where obj1 free -- send a message
-- client process for bank account:
......
......@@ -20,7 +20,7 @@ assembler (Jump l : ins) st a
| lookupST l st label st1 = 9:label:assembler ins st1 (a+2)
where label,st1 free
assembler (Label l : ins) st a
| st1 == insertST l a st = assembler ins st1 a
| st1 =:= insertST l a st = assembler ins st1 a
where st1 free
-- insert an address of a labelid in a symboltable:
......
......@@ -24,3 +24,6 @@ tab n = if n==0 then done else putChar ' ' >> tab (n-1)
-- number of characters for the string representation of a number:
size :: Int -> Int
size n = if n<10 then 1 else size (n `div` 10) + 1
done :: IO ()
done = return ()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment