aboutsummaryrefslogtreecommitdiff
path: root/Smurf.dcl
blob: c4f1c45df5ba4c030eb54dbb7f71ad59e0290436 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
definition module Smurf

from StdOverloaded import class zero, class toString

from Data.Maybe import ::Maybe

:: Stm = Push String
       | Input | Output
       | Cat | Head | Tail | Quotify
       | Put | Get | Exec

:: Program :== [Stm]

:: Stack :== [String]
:: Store :== [(String, String)]

:: State = { stack :: Stack
           , store :: Store
           }

instance toString Stm

instance zero State
instance toString State

step :: !Program State !*File -> *(Maybe (!Program, State), *File)
run :: !Program State *File -> *(Maybe State, *File)