module Data.IO; import Data.String; open Data.String; axiom Action : Type; compile Action { ghc ↦ "IO ()"; c ↦ "int"; }; foreign c { int sequence(int a, int b) { return a + b; \} }; infixl 1 >>; axiom >> : Action → Action → Action; compile >> { ghc ↦ "(>>)"; c ↦ "sequence"; }; axiom put-str : String → Action; compile put-str { ghc ↦ "putStr"; c ↦ "putStr"; }; axiom put-str-ln : String → Action; compile put-str-ln { ghc ↦ "putStrLn"; c ↦ "putStrLn"; }; end;