diff options
author | Camil Staps | 2021-01-04 20:25:07 +0100 |
---|---|---|
committer | Camil Staps | 2021-01-04 20:25:07 +0100 |
commit | 6084502fd84a6f427429966456a97c14691fc10d (patch) | |
tree | 811d9ee0f7873b072f5c92e5221c913c33d45cb7 /ABC/Machine/IO.icl | |
parent | Add note about when not to use this library (diff) |
Diffstat (limited to 'ABC/Machine/IO.icl')
-rw-r--r-- | ABC/Machine/IO.icl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ABC/Machine/IO.icl b/ABC/Machine/IO.icl index aac5ba7..1169c6b 100644 --- a/ABC/Machine/IO.icl +++ b/ABC/Machine/IO.icl @@ -5,15 +5,15 @@ import StdEnv import ABC.Machine import ABC.Misc -:: IO :== [Char] +:: IO =: IO [Char] -instance toString IO where toString io = {c \\ c <- io} +instance toString IO where toString (IO io) = {c \\ c <- io} -io_init :: IO -io_init = [] +io_init :: IO +io_init = IO [] io_print :: a IO -> IO | toString a -io_print x io = io ++ fromString (toString x) +io_print x (IO io) = IO (io ++ fromString (toString x)) show_node :: Node Desc -> String show_node (Basic _ _ b) _ = toString b |