diff options
author | Camil Staps | 2016-04-12 22:01:25 +0200 |
---|---|---|
committer | Camil Staps | 2016-04-12 22:01:25 +0200 |
commit | b605f30516cc1fef04a706137dc9bc202aadc991 (patch) | |
tree | 7c1ea3670052489d455c9262c3a04267afc87503 /Smurf.dcl |
Initial commit
Diffstat (limited to 'Smurf.dcl')
-rw-r--r-- | Smurf.dcl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Smurf.dcl b/Smurf.dcl new file mode 100644 index 0000000..c4f1c45 --- /dev/null +++ b/Smurf.dcl @@ -0,0 +1,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) + |