diff options
author | Camil Staps | 2016-07-05 17:25:10 +0200 |
---|---|---|
committer | Camil Staps | 2016-07-05 17:25:10 +0200 |
commit | ceb0b74bd0b368124679378ebfb2cf316deb2e39 (patch) | |
tree | 7f5c562952bcf0427d838274177123765fe93cf5 /ABC/IO.icl | |
parent | ProgramStore as array for efficiency (diff) |
Added Machine as module level
Diffstat (limited to 'ABC/IO.icl')
-rw-r--r-- | ABC/IO.icl | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/ABC/IO.icl b/ABC/IO.icl deleted file mode 100644 index 0762ed2..0000000 --- a/ABC/IO.icl +++ /dev/null @@ -1,29 +0,0 @@ -implementation module ABC.IO - -import StdEnv - -import ABC.Machine -import ABC.Misc - -:: IO :== [Char] - -instance toString IO where toString io = {c \\ c <- io} - -io_init :: IO -io_init = [] - -io_print :: a IO -> IO | toString a -io_print x io = io ++ fromString (toString x) - -show_node :: Node Desc -> String -show_node (Basic _ _ b) _ = toString b -show_node (Node _ _ _) (Desc _ _ n) = n - -instance toString State -where - toString {astack,bstack,cstack,graphstore,descstore,pc,program,io} - = "pc : " <+ pc <+ "\n" <+ - "A-stack : " <+ astack <+ "\n" <+ - "B-stack : " <+ bstack <+ "\n" <+ - "C-stack : " <+ cstack <+ "\n" <+ - "Graph :\n" <+ show_graphstore graphstore descstore |